iPhone ARC & Facebook SDK

我是研究僧i 提交于 2019-12-01 17:34:33
btype

Do you exclude them from arc with Compiler flag -fno-objc-arc ? You can see a Answer here

And this is why distributing a shared library by copy and pasting files is bad. A library should be distributed as it's own Xcode projects with a static library target, so that the build setting requirements of your projects and the libraries you use can not screw up one or the other.

File a bug for the Facebook SDK here: https://github.com/facebook/facebook-ios-sdk/issues

And in the mean time add the -fno-objc-arc flag to the implementation files in the Facebook SDK. You can do this by;

  1. Select your application target
  2. Go to the Build Phases tab
  3. Add for each file under the Compile Sources section.

The new SDK does not explicitly support ARC out of the box, but there is a shell scrip to build a static library that can be used within your ARC project. Just navigate to your local git repo and run

% ~/facebook-ios-sdk/scripts/build_facebook_ios_sdk_static_lib.sh

This will create the static library under the /lib/facebook-ios-sdk folder (e.g. ~/facebook-ios-sdk/lib/facebook-ios-sdk). You may then drag the facebook-ios-sdk folder into the app Xcode project to include the iOS Facebook SDK static library.

there are actually very few changes needed to make the Facebook iOS sdk compatible with ARC. I have made the changes in my code , but , I do not know who to send it back to the community, any pointers ?

here is a post I made to explain how to use it with ARC the simple way on Xcode 4.2: http://nabtech.wordpress.com/2012/02/02/facebook-ios-sdk-and-arc/

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