Fiz*_*zix 6 facebook objective-c ios facebook-ios-sdk swift
我正在尝试将核心Facebook SDK设置到我的项目中.我的项目是基于Swift的,但SDK是ObjectiveC.
我复制了两个Bolts.framework并FBSDKCoreKit.Framework进入我的项目.我设置了一个完美的桥接文件.然后我将以下内容添加到我的AppDelegate.swift文件中:
import FBSDKCoreKit
func applicationDidBecomeActive(_ application: UIApplication) {
FBSDKAppEvents.activateApp()
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}
func application(_ application: UIApplication, openURL url: URL, sourceApplication: String, annotation: Any) -> Bool {
return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
}
Run Code Online (Sandbox Code Playgroud)
该项目构建,虽然在我的设备上运行时因错误而在启动时崩溃FBSDKCoreKit.framework/FBSDKCoreKit: no matching architecture in universal wrapper.
| 归档时间: |
|
| 查看次数: |
2470 次 |
| 最近记录: |