FBSDKCoreKit.framework/FBSDKCoreKit: no matching architecture in universal wrapper

谁都会走 提交于 2019-12-09 17:56:39

问题


I'm trying to setup the core Facebook SDK into my project. My project is Swift based, yet the SDK is ObjectiveC.

I copied both Bolts.framework and FBSDKCoreKit.Framework into my project. I setup a bridging file which works perfectly. Then I added the following to my AppDelegate.swift file:

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)
}

The project builds, although crashes on start when running on my device with the error FBSDKCoreKit.framework/FBSDKCoreKit: no matching architecture in universal wrapper.


回答1:


This is happening because the wrong frameworks are being included.

Delete all FBSDK and Bolts frameworks from your embedded binaries sections. Now click the plus sign and add them again making sure to select the "iOS" versions of each.



来源:https://stackoverflow.com/questions/40273736/fbsdkcorekit-framework-fbsdkcorekit-no-matching-architecture-in-universal-wrapp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!