【发布时间】:2016-06-02 20:53:20
【问题描述】:
在安装并运行 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) 我尝试了所有干净的构建并建议重新启动,但没有一个起作用。由于我没有 sharekit,所以所有的 sharekit 解决方案也都不起作用。
编辑 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`
【问题讨论】:
-
我可以用这个答案解决这个问题:stackoverflow.com/a/39049990/4564088 但我认为我的问题不是 100% 相同。