There's no good reason to start a project that doesn't use Automatic Reference Counting. Your code ends up being shorter and less prone to leaks and crashes. If you have libraries or older code that doesn't use ARC, add the compilation flag -fno-objc-arc
for that implementation file. In Xcode, you can do this by going to the build target and choosing Build Phases > Compile Sources, paste in -fno-objc-arc
to Compiler Flags. Tip: you can select multiple files and double click them to modify compiler flags for all of them.
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.