Facebook iOS SDK can't compile on iOS project with ARC
When following the steps on how to integrate Facebook to an iOS app, I'm getting a compiler error. This is due to the fact that the classes within the Facebook SDK still uses explicit reference counting (retain, release, etc.)
Soon I found out that a project can contain classes that uses ARC, and classes that doesn't. So this trick work more than just for Facebook SDK but for other libraries too.
Here's how you do it on Xcode 4:
- on the project structure view, open up the project settings
- under targets > build phases, mark the following files (double tap) with -fno-objc-arc compiler flags