在cocoapods安装和运行后,我的Bridge.h导入在查找它们的预期目标时遇到了问题。
我有:
#import <TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h>
#import <DateTools/DateTools.h>
但是它不起作用,因为我的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>
这样就行了,应用程序也构建好了,但是当我运行它时,它给出了这个错误:The operation couldn’t be completed. (LaunchServicesError error 0.)
以下是控制台输出:
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}
我的初始化错误看起来很像这个东西:Unable to run app in Simulator: An error was encountered while running (Domain = LaunchServicesError, Code = 0),我尝试了所有干净的构建和建议的重启,但都没有起作用。另外,所有的共享工具包解决方案也不起作用,因为我没有共享工具包。
编辑1个
我的猜测是:Frameworks/TPKeyboardAvoiding.framework did not have a CFBundleIdentifier in its Info.plist}
才是真正的问题,我需要修改我的info.plist文件来找到TPKeyboardAvoiding
编辑2个
我的info.plist:
编辑3个
这个问题是在我尝试解决之前遇到的问题后出现的问题,这个问题在下面的问题中描述:Empty Pod Headers Folder after pod install
发布于 2016-11-05 06:18:04
对我来说,清理build文件夹是可行的。在Xcode中,按住alt
产品-> Clean Build文件夹。
如果对你有效,请让我知道!
发布于 2016-12-14 04:49:05
我不得不关闭xcode并删除派生数据。只需删除此文件夹
rm -rf ~/Library/Developer/Xcode/DerivedData/
这些方法对我都不起作用。
使用cmd+k
的
gem uninstall cocoapods
,gem install cocoapods
和pod install
pod install
发布于 2016-11-22 19:54:44
这就是Xcode的奇怪行为。
固定解决方案:
0-模拟器:Simulator
> Reset Content & Settings
1-保留alt
Product
-> Clean
Build文件夹
2-关闭Xcode
3-使用终端cd ~/projectDir
转到项目目录
4-运行pod install
5-在Xcode中打开项目
6-运行项目。
https://stackoverflow.com/questions/37601925
复制相似问题