h2. Description
With Xcode 4.2 (iOS 5) Apple introduce ARC (Automatic Reference Counting) to help with memory management. Basically you no longer need to call retain or release. However current examples/books (and (open source) libraries) are still doing it. This leads to (annoying) errors like:
{noformat}ARC forbids explicit message send of ‘retain’{noformat}
*To get rid of this error you need to disable ARC, but how?* Here is what you need to do in Xcode:
h3. Solution
* Select your project file.
* You should be in the “Build settings” tab. Select the “levels” option (default is “Combined”)
* There’s a search field to the right of “Combined”. Enter “Automatic”
* Second group should be “Apple LLVM Compiler 3.0 – Language”. Second line under that controls ARC.
* Click that line, then in the middle column (where it says “yes”), click and choose “no”.
h2. References
* [Lee Silver Blog| http://www.leesilver.net/1/post/2011/8/disabling-arc-on-certain-files-in-xcode.html]
* [Matthias Wessendorf's Weblog| http://matthiaswessendorf.wordpress.com/2011/09/12/disabling-the-arc-in-xcode-4-2/]
With Xcode 4.2 (iOS 5) Apple introduce ARC (Automatic Reference Counting) to help with memory management. Basically you no longer need to call retain or release. However current examples/books (and (open source) libraries) are still doing it. This leads to (annoying) errors like:
{noformat}ARC forbids explicit message send of ‘retain’{noformat}
*To get rid of this error you need to disable ARC, but how?* Here is what you need to do in Xcode:
h3. Solution
* Select your project file.
* You should be in the “Build settings” tab. Select the “levels” option (default is “Combined”)
* There’s a search field to the right of “Combined”. Enter “Automatic”
* Second group should be “Apple LLVM Compiler 3.0 – Language”. Second line under that controls ARC.
* Click that line, then in the middle column (where it says “yes”), click and choose “no”.
h2. References
* [Lee Silver Blog| http://www.leesilver.net/1/post/2011/8/disabling-arc-on-certain-files-in-xcode.html]
* [Matthias Wessendorf's Weblog| http://matthiaswessendorf.wordpress.com/2011/09/12/disabling-the-arc-in-xcode-4-2/]