I am having trouble using this library, I followed the instructions with the facebook guide that appears on the readMe and did all the steps.
Before this, I used the react-native-fbsdk library which is now deprecated due to facebook releasing a newer version (0.9) of the SDK. In the instructions here says that you can add the pod that you need in the podfile of ios but when I add them and then pod install I get this error:
[!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit":
In snapshot (Podfile.lock):
FBSDKCoreKit (= 9.0.1, ~> 9.0.1)
In Podfile:
FacebookShare was resolved to 0.1.1, which depends on
FBSDKCoreKit (~> 4.14)
react-native-fbsdk-next (from `../node_modules/react-native-fbsdk-next`) was resolved to 4.0.0, which depends on
react-native-fbsdk-next/Core (= 4.0.0) was resolved to 4.0.0, which depends on
FBSDKCoreKit (~> 9.0.1)
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* changed the constraints of dependency `FBSDKCoreKit` inside your development pod `react-native-fbsdk-next`.
You should run `pod update FBSDKCoreKit` to apply changes you've made.
Also, with this library you need to modify the appDelegate.m here but when I add that code it says I am missing an import, I know the import missing is FBSDKCoreKit or at least I think it is because the previous SDK used that one. To fix that you need to add the pod but when I add it the error above shows up.
I don’t know if I need the other library because of that dependency. please help!
8
Answers
Had the same issue today I fixed by searching on the Podfile.lock ´FBSDKCoreKit´
Then I replaced the 8.2.0 to 9.0.1 and run pod install. Here are the ones I had on my file
If you are using EAS, try disabling cache in eas.json file and build it again:
{ release: { cache: { disabled: true } } }
Was facing the same issue in my Mac M1 & solved this by running this command.
I fixed by.
What I did,
I updated the
platform :ios, '10.0' to platform :ios, '14.0'
in podfileCheck your react-native-fbsdk platform:ios version.
node_modules/react-native-fbsdk => platform:ios, "12.0"
-> ex) 12.0
In ios/PodFile, setting your platform:ios
-> ex) platform:io, "12.0"
pod update
You should check if the version of
react-native-fbsdk-next
is4.0
If then,
For
"react-native-fbsdk-next": "^11.1.0"
, I did the following:platform :ios, '12.0'
(it was ‘11.0’ before)pod install