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…….

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.