Search code examples
react-nativefacebook-sdk-4.0react-native-ios

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


Solution

    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