React-native-fbsdk: Build Error: Invalid Violation: requireNativeComponent: "RCTFBLoginButton" was not found in the UIManager.

Created on 6 Mar 2019  路  14Comments  路  Source: facebook/react-native-fbsdk

馃悰 Bug Report

simulator screen shot - iphone x - 2019-03-06 at 17 34 12

I finished all the procedure and can login with facebook-sdk from Xcode Build Simulator.
But I encounterd suddenly this Bug.

In my XCode , everything is fine. But If I command 'react-native run-ios' with VSCode, build was failed.

Need Help please...

Most helpful comment

I have fixed manually linking from node_module.
And libFBSDK.a to buildpharse

Thanks webmasterdragon
In details:

  • "Build Phrases" > Link binary with Libraries, check "libRCTFBSDK.a" file existing

    • If not, add it (scroll down and click + > select the file)

  • "Libraries" in the explorer, check "RCTFBSDK.xcodeproj" existing,
  • If not, drag & drop this file from /node_modules/react-native-fbsdk/ios to Libraries
  • Select RCTFBSDK.xcodeproj,
    "Build Settings" > "Frameworks search paths", add path "$(HOME)/Documents/FacebookSDK" if not exist

Sorry for my English.

All 14 comments

can anyone solve that issue I have also facing it

I also have the exact same issue. Anyone?

Same issues :)

Same here

Same

Same here. Had to change to the pod reference from github to fixed ones to get here as well.

Same :/ I re-did the installation steps like 5 times each time following a different document, but same error at the end.

I found out that my issue was linked to Expo environment. If you started your project with Expo, it adds lots of dependencies and complexity (and it bloats APK as well). Bottom line, I started a new project without expo, copied my code, removed all expo dependencies and finally it worked - no errors.

I have fixed manually linking from node_module.
And libFBSDK.a to buildpharse

Yes, linking manually fixes it for me too

what worked for me:

  • yarn install react-native-fbsdk
  • react-native link react-native-fbsdk
  • rm -rf ios/build/
  • react-native run-ios

I have fixed manually linking from node_module.
And libFBSDK.a to buildpharse

Thanks webmasterdragon
In details:

  • "Build Phrases" > Link binary with Libraries, check "libRCTFBSDK.a" file existing

    • If not, add it (scroll down and click + > select the file)

  • "Libraries" in the explorer, check "RCTFBSDK.xcodeproj" existing,
  • If not, drag & drop this file from /node_modules/react-native-fbsdk/ios to Libraries
  • Select RCTFBSDK.xcodeproj,
    "Build Settings" > "Frameworks search paths", add path "$(HOME)/Documents/FacebookSDK" if not exist

Sorry for my English.

I have fixed manually linking from node_module.
And libFBSDK.a to buildpharse

Thanks webmasterdragon
In details:

  • "Build Phrases" > Link binary with Libraries, check "libRCTFBSDK.a" file existing
  • If not, add it (scroll down and click + > select the file)
  • "Libraries" in the explorer, check "RCTFBSDK.xcodeproj" existing,
  • If not, drag & drop this file from /node_modules/react-native-fbsdk/ios to Libraries
  • Select RCTFBSDK.xcodeproj,
    "Build Settings" > "Frameworks search paths", add path "$(HOME)/Documents/FacebookSDK" if not exist

Sorry for my English.

Worked for me!

On RN v60, just running pod install it should work.

You will see the following log:

...
Fetching podspec for `react-native-fbsdk` from `../node_modules/react-native-fbsdk`
...
Downloading dependencies
...
Installing FBSDKCoreKit (5.3.0)
Installing FBSDKLoginKit (5.3.0)
Installing FBSDKShareKit (5.3.0)
...
Installing react-native-fbsdk (1.0.1)
...
"react-native": "0.60.5",
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pyeonjaesik picture pyeonjaesik  路  5Comments

andfs picture andfs  路  5Comments

smzeeshan91 picture smzeeshan91  路  4Comments

emroot picture emroot  路  5Comments

sibelius picture sibelius  路  4Comments