Reputation: 3802
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`
Upvotes: 26
Views: 17548
Reputation: 173
we have two options to resolve the issue
Delete the derived data from xcode's default location as specified in File -> Workspace Settings
Change the derived data location to a custom location in File -> Workspace Settings
Upvotes: -1
Reputation: 22962
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
gem uninstall cocoapods
, gem install cocoapods
and pod install
pod install
cmd+k
Upvotes: 16
Reputation: 2650
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.
Upvotes: 1
Reputation: 3499
For me cleaning the build folder worked. In Xcode, hold alt
Product -> Clean Build Folder..
Let me know if it works for you!
Upvotes: 77
Reputation: 3802
$ 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
Upvotes: -1