FBSDKCoreKit.framework / FBSDKCoreKit:通用包装器中没有匹配的架构 [英] FBSDKCoreKit.framework/FBSDKCoreKit: no matching architecture in universal wrapper

查看:1751
本文介绍了FBSDKCoreKit.framework / FBSDKCoreKit:通用包装器中没有匹配的架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将核心的Facebook SDK设置到我的项目中。我的项目是Swift,而SDK是ObjectiveC。



我复制了 Bolts.framework FBSDKCoreKit.Framework 到我的项目。我设置了一个完美的桥接文件。然后我将以下内容添加到我的AppDelegate.swift文件中:

  import FBSDKCoreKit 

func applicationDidBecomeActive(_应用程序:UIApplication){
FBSDKAppEvents.activateApp()
}

func应用程序(_应用程序:UIApplication,didFinishLaunchingWithOptions launchOptions:[UIApplicationLaunchOptionsKey:Any]? Bool {
FBSDKApplicationDelegate.sharedInstance()。应用程序(应用程序,didFinishLaunchingWithOptions:launchOptions)
返回true
}

func应用程序(_应用程序:UIApplication,openURL url: URL,sourceApplication:String,annotation:Any) - > Bool {
return FBSDKApplicationDelegate.sharedInstance()。application(application,openURL:url,sourceApplication:sourceApplication,annotation:annotation)
}

该项目构建,虽然在我的设备上运行时出现错误,但错误 FBSDKCoreKit.framework / FBSDKCoreKit:通用包装器中没有匹配的体系结构

解决方案

这是因为包含错误的框架而发生。



从嵌入式二进制文件部分删除所有FBSDK和Bolts框架。
现在点击加号并重新添加,确保选择iOS版本。


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.

解决方案

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.

这篇关于FBSDKCoreKit.framework / FBSDKCoreKit:通用包装器中没有匹配的架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆