I have an iOS app that I want to convert to using ARC. I would just use the migration tool, but it errors out for me consistently during the preview phase.
I know I can use the -fobjc-arc
compiler directive on a file-by-file basis, but I want to enable ARC on the entire project, then turn off individual classes using -fno-objc-arc
.
New projects in 4.2 can use ARC by default, so there must be a switch somewhere.
Can anyone help me to convert the project to ARC
I took that from this link, helped me a lot: http://www.mikeash.com/pyblog/friday-qa-2011-09-30-automatic-reference-counting.html
Select your project or target and then go to Build Settings and under the section Apple LLVM compiler 3.0 - Language you will see the option Objective-C Automatic Reference Counting.
For towpse, in Xcode 4.6 you will need to look for "CLANG_ENABLE_OBJC_ARC" and then change it to "Yes" to enable.