Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to Import Bridging Header Error

I accidentally messed up my projects' settings while installing and then uninstalling cocoapods. I'm now getting the error "failed to import bridging header". I checked my build settings and the path to the file under build settings > code generation > objective-c bridging header is correct. I messed around with my Framework Search Paths (they are empty now) in build settings while trying to get cocoapods to work. Would really appreciate some help on fixing this bridging header issue.

like image 418
xyz123 Avatar asked Oct 20 '22 08:10

xyz123


2 Answers

Sounds like the empty Header Search Paths might be what's causing your problems. Try to add $(inherited) to the Header Search Paths list in Build Settings. It will make sure that the header search paths set in the pods xcconfig files are being used.

like image 55
Artal Avatar answered Oct 22 '22 02:10

Artal


Do a search in XCODE for header, see if the bridge header is still "there", if so click on it so it will show in the frame....then look to see if the facebook sdk #import statement is stil there, if not add it .

if you dont find the header file after the search...click file and "Add files to and see if you can find the -Header.h there, if so add it back to your project, if not go to the Build settings again and "clear out " the paths to the header, save your project , close it , reopen it, then try to add a C file and see if the file will regenerate and then you can re add the call to #import facebookSDK

Another thing is you could check to make sure the FBSDKcoreKit.framework is put back into the Build Phases of your target under link binary with libraries

EDIT from your reply :

inside your search paths you should also have the following $(PROJECT_DIR)/yourprojectname just below $(inherited) if you DO NOT have $(PROJECT_DIR)/yourprojectname it WILL give you that error you mentioned as I have duplicated it by removing that from Frameworks search paths

I cant post an image yet or I would for reference

like image 21
Darrell C Avatar answered Oct 22 '22 02:10

Darrell C