iDev: Enable or Disable ARC

iDev: Enable or Disable ARC

Enable ARC on OLD files : 

I want to bring a single Objective-C class written using ARC into an old project.

Add -fobjc-arc flag to any files for which you’d like to enable ARC, as described in the ARC documentation

If you want to enable ARC for many files, you have to:

  1. Open “Build phases” –> “Compile sources”
  2. Select files with “left_mouse” + “cmd” (for separated files) or “shift” (for grouped files – select first and last)
  3. Press “enter”
  4. Paste -fobjc-arc
  5. Press “Enter/Done”.

Disable ARC on MULTIPLE files:

Add -fno-objc-arc flag to any files for which you’d like to disable ARC, as described in the ARC documentation

If you want to disable ARC for many files, you have to:

  1. Open “Build phases” –> “Compile sources”
  2. Select files with “left_mouse” + “cmd” (for separated files) or “shift” (for grouped files – select first and last)
  3. Press “enter”
  4. Paste -fno-objc-arc
  5. Press “Enter/Done”.

Keep Coding 🙂

Thanks…….

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s