Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FBSDKCoreKit/FBSDKCoreKit.h file not found error react-native ios

Try to install Facebook SDK to react natiove IOS.

I have FBSDKCoreKit/FBSDKCoreKit.h file not found error and spent several hours trying to solve it with different solutions, but can't understand whats going wrong((

Any ideas?

react-native 0.40 react-native-fsdk 0.5.0 facebook sdk: 4.19.0

like image 809
Tony Avatar asked Feb 02 '17 06:02

Tony


2 Answers

EDIT: I recommend using CocoaPods so you don't need to download/update the sdk manually.


If you downloaded the sdk manually, try this:

  1. Open your ~/Documents/FacebookSDK folder;

  2. Check if it has these cloud icons right of the filenames:

screenshot.png

If so, macOS removed your files from your computer and uploaded them to iCloud! (thanks Apple)

  1. Click on all the cloud icons, it will download the files back.

That's it!


If this isn't your case, try these:

  • Make sure you followed the getting started correctly;
  • Run sudo chmod -R 755 ~/Documents/FacebookSDK;
  • Try this troubleshooting;
  • Try these other answers.
like image 96
Bruno Lemos Avatar answered Oct 21 '22 03:10

Bruno Lemos


  1. Check if you did react-native link on your RN project.
  2. Manually check in Linked Frameworks And Libraries, that you have libRCTFBSDK.a. If not, hit that + button at the bottom and link it.
  3. When upgrading the project itself react-native from <0.40 make sure you ran react-native upgrade after you've updated the RN package itself with npm install react-native@latest --save
  4. Make sure that you put sdk in ~/Documents/FacebookSDK. I think it's important.

If you come across some errors, sometimes it's better to clear all, and start fresh installation again.

Try:

rm -rf ./node_modules
watchman watch-dell-all
npm cache clean
npm install
react-native run-ios
like image 14
Tony Avatar answered Oct 21 '22 02:10

Tony