How to Disable ARC from XCode Project

To disable ARC completely from an XCode project follow the steps below –

  1. Select Project
  2. Select Targets
  3. From the Right Panel, Select Build Settings
  4. Search for “Automatic Reference Counting”
  5. Locate Apple LLVM compiler x.x – Language and Objective-C Automatic Reference Counting and select NO in all three sections.

Select Project Select Targets From the right panel, select Build Settings Search for "Automatic Reference Counting"; Locate Apple LLVM compiler 3.0 - Language and Objective-C Automatic Reference Counting and select NO in all three sections.

It is also possible to disable ARC for individual files by adding the -fno-objc-arc compiler flag for those files.

You can add compiler flags in Targets -> Build Phases -> Compile Sources. You have to double-click on the right column of the row under Compiler Flags. You can also add it to multiple files by holding the command button to select the files and then pressing enter to bring up the flag edit box.

Namit Gupta

iOS Developer @GetVokal. Passionate about Mobile Apps. Loves to Design. You can reach him on his social profiles below.

Leave a Reply