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 909 forks source link

Compilation error in ios #786

Open rafaelsevla opened 3 years ago

rafaelsevla commented 3 years ago

I have a compilation problem on iOS in version 2.0.0

I added these lines to my info.plist:

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>fb$(FACEBOOK_APP_ID)</string>
            </array>
        </dict>
    </array>
    <key>FacebookAppID</key>
    <string>$(FACEBOOK_APP_ID)</string>
    <key>FacebookDisplayName</key>
    <string>$(APP_NAME)</string>

I added these lines to AppDelegate.m

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  return [[FBSDKApplicationDelegate sharedInstance]application:app
                                                       openURL:url
                                                       options:options];
}

But when run npx react-native run-ios i get this error image (26)

My mac version: 10.13.6 Xcode version: 10.1 React Native version: 0.63.2

When I rollback react-native-fbsdk to v1.1.2 works

hnq90 commented 3 years ago

I got same issue :+1:

max010 commented 3 years ago

Same issue 👍