skip to Main Content

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


  1. 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)
    
    Login or Signup to reply.
  2. If you are using EAS, try disabling cache in eas.json file and build it again:

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

    Login or Signup to reply.
  3. 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
    
    Login or Signup to reply.
  4. I fixed by.

    cd ios
    rm -rf Podfile.lock
    rm -rf Pods
    pod repo update
    pod install
    
    Login or Signup to reply.
  5. What I did,
    I updated the platform :ios, '10.0' to platform :ios, '14.0' in podfile

    Login or Signup to reply.
  6. 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

    Login or Signup to reply.
  7. 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
    
    Login or Signup to reply.
  8. 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
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search