Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It's up to you. You can write apps using ARC (Automatic Reference Counting), and Xcode will write "glue code" to allow your ARC enabled apps to run on iOS 4, no modifications required. However, certain things wont work, and most noticeably many libraries you might wish to use will (sometimes) throw up innumerable errors and you will be unable to use them until the developers release an update which is compatible with ARC.</p> <hr> <p><em>Edit</em>: I recently discovered that you can turn off ARC on a per-file basis. See <a href="https://stackoverflow.com/questions/6308425/ios-5-best-practice-release-retain/6429909#6429909"><strong>pixelfreak</strong>'s answer</a>. So, my advice still stands, but now the 3rd-party libraries shouldn't need to be updated to work with ARC.</p> <p>Here's what Apple says about opting out of ARC for specific files:</p> <blockquote> <p>When you migrate a project to use ARC, the -fobjc-arc compiler flag is set as the default for all Objective-C source files. You can disable ARC for a specific class using the -fno-objc-arc compiler flag for that class. In Xcode, in the target Build Phases tab, open the Compile Sources group to reveal the source file list. Double-click the file for which you want to set the flag, enter -fno-objc-arc in the pop-up panel, then click Done.</p> </blockquote> <p><img src="https://i.stack.imgur.com/Ut63e.png" alt="enter image description here"> </p> <p>See the full transition guide <a href="http://developer.apple.com/library/mac/#releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html" rel="nofollow noreferrer">here</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload