Search code examples
iosreact-nativereact-native-fbsdk

React Native FBSDK attempts to open `urlScheme` without the defined suffix on iOS


I'm attempting to make my FBSDK support multiple applications so I set my CFBundleURLSchemes to be fb{APP_ID}{suffix}. Now when I type fb{APP_ID}{suffix}:// into Safari the correct app is attempted to be opened, however when I attempt to perform a Facebook log in from within the app I'm getting the following error: Exception 'fb{APP_ID} is not registered as a URL scheme. Please add it in you Info.plist' was thrown while invoking logInWithPermissions...

Notice that react-native-fbsdk is attempting to open the app with the URL scheme without the provided suffix.

Any sort of help would be appreciated, thanks!


Solution

  • The issue was that I used the urlScheme without the suffix. The fix for this is:

    CFBundleURLSchemes should be fb{APP_ID}{suffix} and FacebookUrlSchemeSuffix in Info.plist should be suffix