FacebookLoginSDK 4 Apple Mach-O链接器错误

时间:2017-12-18 00:11:43

标签: ios swift linker facebook-login

我正在尝试使用Swift 3Bolts集成到我的IOS应用中。我添加了以下3个框架:FBSDKCoreKitFBSDKLoginKitInfo.plist。我根据Facebook文档更改了我的AppDelegate.swift,创建了Bridging头文件,并将其路径添加到我的构建设置。

在我的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 } 文件中添加以下行后,我得到了:

type

我尝试了此处提供的选项:Apple Mach-O Linker Error when compiling for device 他们都没有帮助(除非我遗漏了什么)。有没有其他人有类似的问题?请帮忙。

1 个答案:

答案 0 :(得分: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()
}