Framework did not have a CFBundleIdentifier in its Info.plist

北城余情 提交于 2019-12-03 09:19:17

问题


I was having issues with my Bridge.h imports finding their intended targets after a cocoapods install and run.

I had:

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

But it didnt work because my Headers folder was empty, so I copied those two folder into the Headers folder and hardcoded the 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>

This worked and the app built but when I ran it it gave this error: The operation couldn’t be completed. (LaunchServicesError error 0.)

Here is the console output:

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}

The initiall error that I have looks alot like this stuff: Unable to run app in Simulator: An error was encountered while running (Domain = LaunchServicesError, Code = 0) I tried all the clean builds and the reboots suggested but none worked. Also all the sharekit solutions also did not work because I do not have sharekit.

EDIT 1

My guess is this: Frameworks/TPKeyboardAvoiding.framework did not have a CFBundleIdentifier in its Info.plist} is the real problem and I need to change my info.plist file to find TPKeyboardAvoiding

EDIT 2

My info.plist:

EDIT 3

This question is a problem that arose after I tried to workaround the problem which I ran into before which is described in this question: Empty Pod Headers Folder after `pod install`


回答1:


For me cleaning the build folder worked. In Xcode, hold alt Product -> Clean Build Folder..

Let me know if it works for you!




回答2:


I had to close xcode and delete derived data. Just delete this folder

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

None of these approaches worked for me

  1. gem uninstall cocoapods, gem install cocoapods and pod install
  2. pod install
  3. clean xcode using cmd+k



回答3:


This is the strange behaviour of Xcode.

FIXED SOLUTION:

0- Simulator: Simulator > Reset Content & Settings

1- Hold alt Product -> Clean Build Folder

2- Close Xcode

3- Go to project directory using terminal cd ~/projectDir

4- Run pod install

5- Open project in Xcode

6- Run the project.




回答4:


$ gem uninstall cocoapods
$ gem install cocoapods

Add all things (crashlytics and fabric included) as pods. Delete any extra things you made i.e. /Users/username/Documents/new_ios/ios-app/Pods/Headers/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.h

$ pod install



回答5:


we have two options to resolve the issue

  1. Delete the derived data from xcode's default location as specified in File -> Workspace Settings

  2. Change the derived data location to a custom location in File -> Workspace Settings



来源:https://stackoverflow.com/questions/37601925/framework-did-not-have-a-cfbundleidentifier-in-its-info-plist

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!