首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >框架的Info.plist中没有CFBundleIdentifier

框架的Info.plist中没有CFBundleIdentifier
EN

Stack Overflow用户
提问于 2016-06-03 04:53:20
回答 5查看 15.3K关注 0票数 25

在cocoapods安装和运行后,我的Bridge.h导入在查找它们的预期目标时遇到了问题。

我有:

代码语言:javascript
复制
#import <TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h>
#import <DateTools/DateTools.h>

但是它不起作用,因为我的Headers文件夹是空的,所以我将这两个文件夹复制到Headers文件夹中,并硬编码了路径:

代码语言:javascript
复制
#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.)

以下是控制台输出:

代码语言:javascript
复制
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

EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2016-11-05 06:18:04

对我来说,清理build文件夹是可行的。在Xcode中,按住alt产品-> Clean Build文件夹。

如果对你有效,请让我知道!

票数 78
EN

Stack Overflow用户

发布于 2016-12-14 04:49:05

我不得不关闭xcode并删除派生数据。只需删除此文件夹

代码语言:javascript
复制
rm -rf ~/Library/Developer/Xcode/DerivedData/

这些方法对我都不起作用。

使用cmd+k

  1. gem uninstall cocoapodsgem install cocoapodspod install
  2. pod install
  3. clean xcode
票数 16
EN

Stack Overflow用户

发布于 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-运行项目。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37601925

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档