facebook 3.0.8支持iPhone5

来源:互联网 发布:python 打包安装程序 编辑:程序博客网 时间:2024/06/06 12:52

FACEBOOK 3.0.8下载地址:https://github.com/facebook/facebook-ios-sdk/tree/sdk-version-3.0.8

参考如下文章:http://alexanderwong.me/post/32277225382/facebook-sdk-xcode-4-5-ios-6-0

Facebook SDK Xcode 4.5 iOS 6.0

If you’re seeing an error like the following in Xcode 4.5 have no fear!

file is universal (3 slices) but does not contain a(n) armv7s slice: ....FacebookSDK.framework/FacebookSDK for architecture armv7s

The downloadable version of Facebook’s iOS SDK hasn’t been updated to handle armv7 yet. You can, however, obtain a version built for armv7 by following the following steps:

  1. Download the official FB iOS SDK src here: https://github.com/facebook/facebook-ios-sdk
  2. Unzip the file and inside the “src” folder you’ll find an Xcode project. Open it up in Xcode 4.5.
  3. Under Targets > facebook-ios-sdk > Build Settings, change Architectures to “Standard (armv7, armv7s)”.
  4. Make sure the settings gets saved by reopening the project and making sure the correct architecture is still selected.
  5. Back in the FB iOS SDK base directory, go to the “scripts” folder and run build_all.sh.
  6. The script will create a folder named “FacebookSDK.framework” inside a folder named “build”. Copy “FacebookSDK.framework” and replace your original FB iOS SDK install (normally in ~/Documents/FacebookSDK/FacebookSDK.framework).
  7. Your original project should now build correctly.

If you want to wait for FB to release their own build or you have other libraries that you cannot rebuild the library files for, you can also continue to work on and build your project by removing “armv7s” from the “Targets > Build Settings > Architectures > Valid Architectures section.


Building Framework过程:

samuel-2:scripts yanjun$ sudo sh build_all.sh
Password:
Building Framework.
Compiling for platform: iphonesimulator.
Build settings from command line:
    CURRENT_PROJECT_VERSION = 0.1.20130221
    SDKROOT = iphonesimulator6.0
    SYMROOT = /Users/yanjun/Downloads/facebook-ios-sdk-sdk-version-3.0.8/build


在使用上面生成的3.0.8的包的过程中,发现其在IOS 6.0上报错。

 -[SBJsonParser errorTrace]: unrecognized selector sent to instance 0x48ad90
处理方案如下:

http://stackoverflow.com/questions/12301617/application-crash-on-login-in-ios-facebook-sdk-3-0

http://developers.facebook.com/bugs/202230616574138/

新库地址:

https://github.com/garthex/facebook-ios-sdk

https://github.com/facebook/facebook-ios-sdk/pull/481  ----In this pull request, I've upgraded SBJson from v2.2.3 to v3.1.1 for Facebook-iOS-SDK v3.0.7.

原创粉丝点击