4

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!

Carlos Yanes
  • 335
  • 5
  • 15

8 Answers8

4

Was facing the same issue in my Mac M1 & solved this by running this command.

1- cd ios
2- arch -x86_64 pod install --repo-update
Muhammad Haidar
  • 1,541
  • 16
  • 17
4

For "react-native-fbsdk-next": "^11.1.0", I did the following:

  1. Changed this in Podfile platform :ios, '12.0' (it was '11.0' before)
  2. Removed Podfile.lock
  3. pod install
tufanlodos
  • 121
  • 1
  • 5
3

I fixed by.

cd ios
rm -rf Podfile.lock
rm -rf Pods
pod repo update
pod install
Fakfa Chuchit
  • 111
  • 1
  • 3
1

Check your react-native-fbsdk platform:ios version.

  1. node_modules/react-native-fbsdk => platform:ios, "12.0" -> ex) 12.0

  2. In ios/PodFile, setting your platform:ios -> ex) platform:io, "12.0"

  3. pod update

sunjungAn
  • 11
  • 1
0

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

  - FBSDKCoreKit (9.0.1):
    - FBSDKCoreKit/Basics (= 9.0.1)
    - FBSDKCoreKit/Core (= 9.0.1)
 - FBSDKCoreKit/Basics (9.0.1)
 - FBSDKCoreKit/Core (9.0.1):
    - FBSDKCoreKit/Basics
 - FBSDKLoginKit (9.0.1):
    - FBSDKLoginKit/Login (= 9.0.1)
 - FBSDKLoginKit/Login (9.0.1):
    - FBSDKCoreKit (~> 9.0.1)
 - FBSDKShareKit (9.0.1):
    - FBSDKShareKit/Share (= 9.0.1)
 - FBSDKShareKit/Share (9.0.1):
    - FBSDKCoreKit (~> 9.0.1)
0

If you are using EAS, try disabling cache in eas.json file and build it again:

{ release: { cache: { disabled: true } } }

Kuzz
  • 1
  • 4
0

What I did, I updated the platform :ios, '10.0' to platform :ios, '14.0' in podfile

Usama Shahid
  • 769
  • 6
  • 9
0

You should check if the version of react-native-fbsdk-next is 4.0

If then,

rm -rf node_modules
yarn or npm install
npx pod-install ios
hong developer
  • 13,291
  • 4
  • 38
  • 68