-1

I am trying to integrate FacebookLogin SDK 4 into my IOS app using Swift 3. I added the following 3 frameworks: Bolts, FBSDKCoreKit and FBSDKLoginKit. I changed my Info.plist according to Facebook documentation, created the Bridging header file, and added its path to my Build Settings.

Once I add the following line in my AppDelegate.swift file, I am getting:

Apple Mach-O Linker Error:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
        return true
    }

I tried the options provided here: Apple Mach-O Linker Error when compiling for device None of them helped (unless I am missing something). Has anyone else had a similar problem? Please help.

Vasilis G.
  • 7,556
  • 4
  • 19
  • 29
codedev
  • 31
  • 5

1 Answers1

0

Have u added this method in app delegate

   func application(_ application: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any])
        -> Bool {
            return FBSDKApplicationDelegate.sharedInstance().application(application, open: url as URL!, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String, annotation: [:])
}

also this one in willResignActive method

func applicationWillResignActive(_ application: UIApplication)
{
     FBSDKAppEvents.activateApp()
}
Uma Madhavi
  • 4,851
  • 5
  • 38
  • 73