Environment:
OS: macOS High Sierra 10.13.6
Node: 10.12.0
Yarn: Not Found
npm: 6.4.1
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.2 AI-181.5540.7.32.5056338
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.51.0 => 0.51.0
Hi guys,
I am trying to build my app after installing react-native-fbsdk and following all instructions in your Readme and from Getting Started guide.
I am constantly getting the following error:
'React/RCTConvert.h' file not found
The error is happening in file RCTConvert+FBSDKSharingContent.h on line #import <React/RCTConvert.h>.
I tried all solutions I could find on the internet, but nothing works. I have FB*.framework files in my "Link binary with Libraries" settings. Also, I've added '~/Documents/FacebookSDK' in Header Search paths under Build Settings.
I tried installing FacebookSDK via Podfile and also directly inside Documents folder.
Please help as I don't have any more ideas.
P.S. Android works.
Any Solution ?
I gave up using Cocoapods with React Native. For what I understood FacebookSDK pod comes with a dependency on React pod. But React pod is 0.11 and is no more maintained, which causes conflicts with earlier React Native releases. Using Cocoapods with React Native is really a pain 馃憥
I managed to implement it by updating the Xcode to the newest version (10.1) as well as React Native (0.57.5).
I've also put this in my Podfile:
pod 'FacebookSDK'
pod 'React', :path => '../node_modules/react-native'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
I found much success with @vladotg's Podfile update
I had to change my pod to following to get both debug and archive work
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'CxxBridge', # Include this for RN >= 0.47
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
pod 'FBSDKCoreKit', '~> 4.39.1'
pod 'FBSDKLoginKit', '~> 4.39.1'
pod 'FBSDKShareKit', '~> 4.39.1'
Don't forget to cd ios && pod install after changing the Podfile
Most helpful comment
I managed to implement it by updating the Xcode to the newest version (10.1) as well as React Native (0.57.5).
I've also put this in my Podfile: