框架的Info.plist中没有CFBundleIdentifier

我在使用cocoapods安装并运行后,发现Bridge.h导入的问题。

我有:

#import <TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h> #import <DateTools/DateTools.h> 

但它没有工作,因为我的头文件夹是空的,所以我复制这两个文件夹到头文件夹,并硬编码的path:

 #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.) 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} 

initiall错误,我看起来很像这样的东西: 无法在模拟器中运行应用程序:运行时遇到错误(域= LaunchServicesError,代码= 0)我尝试了所有干净的构build和重新启动build议,但没有工作。 所有的共享工具包解决scheme也没有工作,因为我没有共享工具包。

编辑1

我的猜测是这样的: Frameworks/TPKeyboardAvoiding.framework did not have a CFBundleIdentifier in its Info.plist}是真正的问题,我需要更改我的info.plist文件以findTPKeyboardAvoiding

编辑2

我的info.plist:

在这里输入图像说明

编辑3

这个问题是在我尝试解决之前遇到的问题之后产生的一个问题,在这个问题之前描述了这个问题: `pod install`后的Empty Pod Headers文件夹

对我来说,清理生成文件夹的工作。 在Xcode中,按住产品 – >清理生成文件夹

请让我知道这对你有没有用!

我不得不closuresxcode并删除派生的数据。 只要删除这个文件夹

 rm -rf ~/Library/Developer/Xcode/DerivedData/ 

这些方法都不适合我

  1. gem uninstall cocoapodsgem install cocoapodspod install
  2. pod install
  3. 使用cmd+k清理xcode

这是Xcode的奇怪行为。

固定解决scheme:

模拟器: Simulator > Reset Content & Settings

1-保持Product – > Clean生成文件夹

2-closuresXcode

3-使用terminalcd ~/projectDir进入项目目录

4-运行pod install

5-在Xcode中打开项目

6-运行该项目。

 $ gem uninstall cocoapods $ gem install cocoapods 

添加所有的东西(包括crashlytics和织物)作为豆荚。 删除你所做的任何额外的事情,例如/用户/用户名/文档/新闻/ios-app/Pods/Headers/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h

 $ pod install 

我们有两个select来解决这个问题

  1. 从文件 – >工作区设置中指定的xcode默认位置删除派生数据

  2. 将导出的数据位置更改为文件 – >工作区设置中的自定义位置