适用于 iOS6/Xcode 4.5 的 Facebook SDK 无法正常工作 [英] Facebook SDK for iOS6/Xcode 4.5 not working
问题描述
可能的重复:
文件是通用(3 片),但不包含 iOS 上静态库的 (n) armv7s 切片错误,无论如何要绕过?
最近将 Xcode 和我的 iOS 设备升级到各自的最新版本,我现在无法使用 Facebook SDK(版本 3.0.8)为设备构建应用 - 在模拟器上构建工作正常.
Recently upgraded Xcode and my iOS devices to the latest respective versions and i'm now unable to build an app using the Facebook SDK (version 3.0.8) for a device - building on the Simulator works fine.
我在尝试构建时收到的错误:
Error I'm receiving whilst trying to build:
file is universal (3 slices) but does not contain a(n) armv7s slice: ....FacebookSDK.framework/FacebookSDK for architecture armv7s
我注意到在 iOS SDK 登录页面 (http://developers.facebook.com/ios/) 他们有这段文字..
I've noticed that on the iOS SDK landing page (http://developers.facebook.com/ios/) they have this peice of text..
升级到 3.0 SDK.在接下来的几周内,我们将在 SDK 中添加对备受期待的 iOS 6 集成的支持.
所以..是这样吗?在他们支持 iOS6 之前,我真的无法继续工作可能 几周?
So.. is that it? Am i literally unable to continue to work for potentially weeks until they support iOS6?
我希望有一个快速解决方案,当然我不能成为这种情况下唯一的人.
I'm hoping there is a quick fix for this, surely I can't be the only one in this situation.
感谢您提供的任何帮助.
Thanks for any help you can offer.
推荐答案
对于临时修复,您可以按照 Sudhakar 所说的做,但该应用无法在 iPhone 5 上运行,(或者至少在我的测试中它没有).你真的需要一个正确编译的 SDK.
For a temporary fix you can do what Sudhakar said, but the app won't run on an iPhone 5, (or atleast with my tests it didn't). You really need a properly compiled SDK.
当前的 Facebook SDK 是为 armv6 构建的.我听说他们正在努力尽快推出为 armv7 构建的新版本.
The current Facebook SDK is build for armv6. I hear they are working on getting a new version out asap that is build for armv7.
与此同时,您可以从 github 克隆 facebook SDK 并自己编译 SDK 以使用 armv7.以下是说明:
In the meantime you can clone down the facebook SDK from github and compile the SDK to work with armv7 yourself. Below are the instructions:
- 从 git 中心页面 (https://github.com/facebook/facebook-ios-sdk) 下载或克隆源代码的副本
- 打开 xcode 项目并在构建设置中将架构更改为 armv7.
- 保存并关闭
- 导航到/scripts 并在终端中运行 build_all.sh
这将编译源代码并输出 builds/FacebookSDK.framework为了让它工作,我必须将 git 存储库克隆到/Desktop/iOS我用新创建的版本替换了我的应用程序中的 FacebookSDK.framework,它就像一个魅力.
This will then compile the source and output builds/FacebookSDK.framework To get this to work I had to clone the git repository to /Desktop/iOS I replaced the FacebookSDK.framework that was within my app with the newly created version and it worked like a charm.
祝你好运!
这篇关于适用于 iOS6/Xcode 4.5 的 Facebook SDK 无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!