facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 906 forks source link

react native 6 #585

Open billtlee opened 5 years ago

billtlee commented 5 years ago

I just upgraded to react native 6. How do I install this package in react native 6? I tried putting

pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'

into the podfile and running pod install. However, I am getting the following error:

[!] CocoaPods could not find compatible versions for pod "FBSDKShareKit": In Podfile: react-native-fbsdk (from ../node_modules/react-native-fbsdk) was resolved to 0.10.1, which depends on react-native-fbsdk/Share (= 0.10.1) was resolved to 0.10.1, which depends on FBSDKShareKit (~> 5.0.0)

None of your spec sources contain a spec satisfying the dependency: FBSDKShareKit (~> 5.0.0).

eggybot commented 5 years ago

just add this without the version

  pod 'FBSDKCoreKit'
  pod 'FBSDKLoginKit'
  pod 'FBSDKShareKit'

Although after successfully installing the fbsdk for pod. this error show's up https://github.com/facebook/react-native-fbsdk/issues/586

billtlee commented 5 years ago

Yea, I tried that too and am getting the same error. So, dead in the water for now.

anduscheung commented 5 years ago

Try remove any of the followings

pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'

Then do pod update, the dependencies including FBSDKShareKit will be installed automatically, have not received any error so far

cbothra commented 5 years ago

I got the same error after installing the sdk (via npm) and running pod install in the ios folder. Below are the steps I followed to resolve this error:

cesar3030 commented 5 years ago

I had a similar error:

[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
  In Podfile:
    react-native-fbsdk (from `../node_modules/react-native-fbsdk`) was resolved to 1.0.4, which depends on
      react-native-fbsdk/Login (= 1.0.4) was resolved to 1.0.4, which depends on
        FBSDKLoginKit (~> 5.5)

@cbothra commands solved the issue! Thank you very much

  • pod repo update
  • pod install
Quadriphobs1 commented 5 years ago

Sometimes it just so happens that in the Podfile.lock has a locked version of the sdk and after the update it is still trying to install the old version, if you delete it and do pod install again it should fix the error

jay-jlm commented 3 years ago

This one also threw me for a loop, turns out that if only update one Pod at a time, the prompt will keep throwing incompatibility errors at you (since they rely on each other), which may be confusing. To avoid that pitfall you can update all 3 dependencies with a single command like this:

pod update FBSDKShareKit FBSDKLoginKit FBSDKCoreKit

Hope it helps!