Search code examples
react-nativereact-native-iosreact-native-fbsdkfbsdksharekit

React Native FBSDK file not found on CI


I have installed FBSDKCoreKit, FBSDKLoginKit and FBSDKShareKit by downloading the SDK to ~/Documents/FacebookSDK and then dragging the frameworks in to the frameworks folder in XCode. I checked the option to copy the files if needed so they appear in the project.

I then added the correct framework search path ~/Documents/FacebookSDK

Building locally works fine, however, building on Bitrise (CI) fails with the error:

/Users/vagrant/git/node_modules/react-native-fbsdk/ios/RCTFBSDK/share/RCTFBSDKShareDialog.h:21:9: 'FBSDKShareKit/FBSDKShareKit.h' file not found

The framework search path also contains $(PROJECT_DIR) which should find the frameworks located in appname/Frameworks/ but I cannot seem to fix this not found error.


Solution

  • See: https://discuss.bitrise.io/t/build-failing-with-file-not-found-fbsdk-in-ios-build/399/11

    It seems that you have the FacebookSDK on your Mac at ~/Documents/FacebookSDK, but you don't download it there on bitrise.io, so it's simply not available for your build.