React-native-fbsdk: Undefined symbols for architecture x86_64

Created on 2 Oct 2015  路  7Comments  路  Source: facebook/react-native-fbsdk

I get the following error: Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_FBSDKApplicationDelegate", referenced from: objc-class-ref in AppDelegate.o when running the app to use the Login Button.

package.json dependencies

    "react-native": "git://github.com/facebook/react-native.git#master",
    "react-native-fbsdkcore": "0.0.5",
    "react-native-fbsdklogin": "0.0.5",

AppDelegate.m

#import "AppDelegate.h"

#import "RCTRootView.h"

#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  NSURL *jsCodeLocation;

  jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=false"];

  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                      moduleName:@"Divebook"
                                               initialProperties:nil
                                                   launchOptions:launchOptions];

  self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  UIViewController *rootViewController = [[UIViewController alloc] init];
  rootViewController.view = rootView;
  self.window.rootViewController = rootViewController;
  [self.window makeKeyAndVisible];

  return [[FBSDKApplicationDelegate sharedInstance] application:application
    didFinishLaunchingWithOptions:launchOptions];
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
  return [[FBSDKApplicationDelegate sharedInstance] application:application
    openURL:url
    sourceApplication:sourceApplication
    annotation:annotation
  ];
}


@end

Most helpful comment

Fixed it by adding $(inherited) to Other Linker Flags under Build Settings.

image

All 7 comments

Fixed it by adding $(inherited) to Other Linker Flags under Build Settings.

image

@naoisegolden Thank you so much! Had the same issue, and this fixed it, maybe this should go into the Readme?

@naoisegolden could please you post here all the flags, I have same error but only these flags
screen shot 2015-12-17 at 16 11 27

@alfonsodev I have the exact same flags, but the $(inherited) yields a whole array of flags you don't have. Sorry but I can't remember how I got to this point.

image

I'm having an issue with this as well... I got it to work before in React Native < 0.17. I thought maybe adding the Bolts/Foundation/etc Frameworks to the Build Phases would work, but that didn't work.

Thanks man, it was helpful.

Encountered similar issue

Undefined symbols for architecture x86_64:
"___darwin_check_fd_set_overflow", referenced from:
_RAND_poll in libcrypto.a(rand_unix.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am using Xcode 11.3.1, react native 0.63.
Thank you

Was this page helpful?
0 / 5 - 0 ratings