Absolute Ripple
  • Absolute Ripple
  • Contact

Diabling Automatic Reference Counting (ARC) in selected class files

15/2/2012

0 Comments

 
Scenario: You are using Automatic Reference Counting (ARC) in iOS 5 for your project, but you are also using some old class files or open-source libraries that are not ARC compliant. Your project won't compile.

Solution: Disable ARC on those files that are not ARC compliant by inserting a compiler flag. (Of course, the onus is then on you to ensure that those files adopt the appropriate memory management practice.)

To disable ARC on a per file basis:
1. Select the project in the Project Navigator
2. Select the relevant Targets (there should just be one if you have just created the project)
3. Click "Build Phases" tab along the top on the right hand side
4. Click the "Compile Sources" tab
5. Locate the implementation (.m) file you want to disable ARC and double click it
6. Type or paste in "-fno-objc-arc" on the dialog box that appears

0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Archives

    August 2013
    July 2013
    June 2013
    May 2013
    January 2013
    October 2012
    September 2012
    March 2012
    February 2012

    Categories

    All
    Apple Policy
    In App Purchase
    Ios Programming
    Our Apps

    RSS Feed

    Disclaimers

    Here are some resources that I find useful in writing iOS apps. These are not necessarily unique as they are based on various sources online.
    This is mainly to provide a source of reference to myself and my associates but if it can be of use to someone else, that is good.
    Note that information is provided here as is. Use at your own risk. There is no guarantee that it is accurate. We will update the information as time and resources permit.

    Powered by Create your own unique website with customizable templates.