[英]Framework did not have a CFBundleIdentifier in its Info.plist
I was having issues with my Bridge.h imports finding their intended targets after a cocoapods install and run. 在安装和运行cocoapods之后,我的Bridge.h导入问题找到了预期的目标。
I had: 我有:
#import <TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h>
#import <DateTools/DateTools.h>
But it didnt work because my Headers folder was empty, so I copied those two folder into the Headers folder and hardcoded the path: 但它没有用,因为我的Headers文件夹是空的,所以我将这两个文件夹复制到Headers文件夹并硬编码路径:
#import </Users/username/Documents/new_ios/ios-app/Pods/Headers/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h>
#import </Users/username/Documents/new_ios/ios-app/Pods/Headers/DateTools/DateTools.h>
This worked and the app built but when I ran it it gave this error: The operation couldn't be completed. (LaunchServicesError error 0.)
这工作和应用程序构建,但当我运行它时,它给出了这个错误: The operation couldn't be completed. (LaunchServicesError error 0.)
The operation couldn't be completed. (LaunchServicesError error 0.)
Here is the console output: 这是控制台输出:
6/2/16 4:41:24.961 PM uploadDSYM[3519]: Fabric.framework/run 1.4.0
6/2/16 4:41:24.981 PM uploadDSYM[3521]: Fabric.framework/run 1.4.0
6/2/16 4:41:25.011 PM appleeventsd[51]: SecTaskLoadEntitlements failed error=22
6/2/16 4:41:25.019 PM sharedfilelistd[251]: SecTaskLoadEntitlements failed error=22
6/2/16 4:41:25.093 PM Fabric[257]: Bundle indentifier is of type (null), returning empty string.
6/2/16 4:41:25.752 PM com.apple.CoreSimulator.CoreSimulatorService[331]: Error Domain=LaunchServicesError Code=0 "(null)" UserInfo={Error=MissingBundleIdentifier, ErrorDescription=Bundle at path /Users/username/Library/Developer/CoreSimulator/Devices/#####-####-####-####-##########/data/Library/Caches/com.apple.mobile.installd.staging/temp.16rUWf/extracted/AppName.app/Frameworks/TPKeyboardAvoiding.framework did not have a CFBundleIdentifier in its Info.plist}
The initiall error that I have looks alot like this stuff: Unable to run app in Simulator: An error was encountered while running (Domain = LaunchServicesError, Code = 0) I tried all the clean builds and the reboots suggested but none worked. 我看到的初始错误看起来很像这样的东西: 无法在模拟器中运行应用程序:运行时遇到错误(Domain = LaunchServicesError,Code = 0)我尝试了所有干净的构建和重新启动建议但没有工作。 Also all the sharekit solutions also did not work because I do not have sharekit. 此外,所有的sharekit解决方案也没有用,因为我没有sharekit。
EDIT 1 编辑1
My guess is this: Frameworks/TPKeyboardAvoiding.framework did not have a CFBundleIdentifier in its Info.plist}
is the real problem and I need to change my info.plist file to find TPKeyboardAvoiding 我的猜测是这样的: Frameworks/TPKeyboardAvoiding.framework did not have a CFBundleIdentifier in its Info.plist}
是真正的问题,我需要更改我的info.plist文件以找到TPKeyboardAvoiding
EDIT 2 编辑2
My info.plist: 我的info.plist:
EDIT 3 编辑3
This question is a problem that arose after I tried to workaround the problem which I ran into before which is described in this question: Empty Pod Headers Folder after `pod install` 这个问题是在我尝试解决之前遇到的问题之后出现的一个问题,在此问题中描述了这个问题: “pod install”之后的空Pod Headers文件夹
For me cleaning the build folder worked. 对我来说,清理构建文件夹工作。 In Xcode, hold alt
Product -> Clean Build Folder.. 在Xcode中,按住alt
Product - > Clean Build Folder ..
Let me know if it works for you! 请让我知道这对你有没有用!
I had to close xcode and delete derived data. 我不得不关闭xcode并删除派生数据。 Just delete this folder 只需删除此文件夹
rm -rf ~/Library/Developer/Xcode/DerivedData/
None of these approaches worked for me 这些方法都不适合我
gem uninstall cocoapods
, gem install cocoapods
and pod install
gem uninstall cocoapods
, gem install cocoapods
和pod install
pod install
cmd+k
使用cmd+k
清理xcode This is the strange behaviour of Xcode. 这是Xcode的奇怪行为。
FIXED SOLUTION: 固定解决方案:
0- Simulator: Simulator
> Reset Content & Settings
0-模拟器: Simulator
> Reset Content & Settings
1- Hold alt
Product
-> Clean
Build Folder 1-保持alt
Product
- > Clean
构建文件夹
2- Close Xcode 2-关闭Xcode
3- Go to project directory using terminal cd ~/projectDir
3-使用终端cd ~/projectDir
转到项目目录
4- Run pod install
4-运行pod install
5- Open project in Xcode 5-在Xcode中打开项目
6- Run the project. 6-运行项目。
$ gem uninstall cocoapods
$ gem install cocoapods
Add all things (crashlytics and fabric included) as pods. 添加所有东西(包括崩解物和织物)作为吊舱。 Delete any extra things you made ie /Users/username/Documents/new_ios/ios-app/Pods/Headers/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h 删除你做的任何额外的东西,即/Users/username/Documents/new_ios/ios-app/Pods/Headers/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h
$ pod install
we have two options to resolve the issue 我们有两种方法可以解决这个问题
Delete the derived data from xcode's default location as specified in File -> Workspace Settings 从文件 - >工作区设置中指定的xcode的默认位置删除派生数据
Change the derived data location to a custom location in File -> Workspace Settings 在“文件” - >“工作区设置”中将派生数据位置更改为自定义位置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.