我正在尝试使用Swift 3
将Bolts
集成到我的IOS应用中。我添加了以下3个框架:FBSDKCoreKit
,FBSDKLoginKit
和Info.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 他们都没有帮助(除非我遗漏了什么)。有没有其他人有类似的问题?请帮忙。
答案 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()
}