框架在其 Info.plist 中没有 CFBundleIdentifier
Framework did not have a CFBundleIdentifier in its Info.plist
在安装 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)我尝试了所有干净的构建并建议重新启动,但 none 有效。此外,所有的 sharekit 解决方案也不起作用,因为我没有 sharekit。
编辑 1
我的猜测是:Frameworks/TPKeyboardAvoiding.framework did not have a CFBundleIdentifier in its Info.plist}
是真正的问题,我需要更改我的 info.plist 文件以找到 TPKeyboardAvoiding
编辑 2
我的info.plist:
编辑 3
这个问题是在我尝试解决我之前 运行 遇到的问题之后出现的问题,这个问题在这个问题中有描述:
$ gem uninstall cocoapods
$ gem install cocoapods
将所有内容(包括 crashlytics 和 fabric)添加为 pods。
删除您所做的任何额外内容,即 /Users/username/Documents/new_ios/ios-app/Pods/Headers/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h
$ pod install
对我来说,清理构建文件夹很有效。在 Xcode 中,按住 alt
产品 -> 清理构建文件夹..
让我知道它是否适合你!
这是 Xcode 的奇怪行为。
固定解决方案:
0- 模拟器:Simulator
> Reset Content & Settings
1- 按住 alt
Product
-> Clean
构建文件夹
2-关闭Xcode
3- 使用终端进入项目目录
cd ~/projectDir
4- 运行 pod install
5- 在 Xcode
中打开项目
6- 运行 项目。
我不得不关闭 xcode 并删除派生数据。只需删除此文件夹
rm -rf ~/Library/Developer/Xcode/DerivedData/
None 这些方法对我有用
gem uninstall cocoapods
、gem install cocoapods
和 pod install
pod install
- 使用
cmd+k
清理 xcode
我们有两种解决问题的方法
从文件 -> 工作区设置
中指定的 xcode 默认位置删除派生数据
在文件 -> 工作区设置中将派生数据位置更改为自定义位置
在安装 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)我尝试了所有干净的构建并建议重新启动,但 none 有效。此外,所有的 sharekit 解决方案也不起作用,因为我没有 sharekit。
编辑 1
我的猜测是:Frameworks/TPKeyboardAvoiding.framework did not have a CFBundleIdentifier in its Info.plist}
是真正的问题,我需要更改我的 info.plist 文件以找到 TPKeyboardAvoiding
编辑 2
我的info.plist:
编辑 3
这个问题是在我尝试解决我之前 运行 遇到的问题之后出现的问题,这个问题在这个问题中有描述:
$ gem uninstall cocoapods
$ gem install cocoapods
将所有内容(包括 crashlytics 和 fabric)添加为 pods。 删除您所做的任何额外内容,即 /Users/username/Documents/new_ios/ios-app/Pods/Headers/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h
$ pod install
对我来说,清理构建文件夹很有效。在 Xcode 中,按住 alt
产品 -> 清理构建文件夹..
让我知道它是否适合你!
这是 Xcode 的奇怪行为。
固定解决方案:
0- 模拟器:Simulator
> Reset Content & Settings
1- 按住 alt
Product
-> Clean
构建文件夹
2-关闭Xcode
3- 使用终端进入项目目录
cd ~/projectDir
4- 运行 pod install
5- 在 Xcode
中打开项目6- 运行 项目。
我不得不关闭 xcode 并删除派生数据。只需删除此文件夹
rm -rf ~/Library/Developer/Xcode/DerivedData/
None 这些方法对我有用
gem uninstall cocoapods
、gem install cocoapods
和pod install
pod install
- 使用
cmd+k
清理 xcode
我们有两种解决问题的方法
从文件 -> 工作区设置
中指定的 xcode 默认位置删除派生数据
在文件 -> 工作区设置中将派生数据位置更改为自定义位置