If a project has already been created with ARC disabled, how do I enable it and vice versa?
4 Answers
Open your project and select Edit -> Refactor -> Convert to Objective-C ARC. This will start checking your code if it is ready for the conversion.
See also Clang documentation: Objective-C Automatic Reference Counting (ARC)
How to disable ARC has been answered here

- 5,363
- 1
- 21
- 24

- 1,123
- 9
- 8
Following are the steps which I did and it worked for me
- Select
Project
- Select
Targets
- From the right panel, select
Build Settings
- Search for "Automatic Reference Counting";
- Locate
Apple LLVM compiler 3.0 - Language
andObjective-C Automatic Reference Counting
and selectNO
in all three sections.

- 10,258
- 5
- 70
- 83
-
1Setting to NO, will it enable or disable ARC ? Please mention clearly in your answer – Arshad Shaik Dec 24 '20 at 04:33
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.

- 3,645
- 8
- 36
- 59
In Xcode 5.0.2, select your project in Navigatior, select Build Settings, search for Apple LLVM 5.0 - Language - Objective C and change Objective-C Automatic Refence Counting to NO

- 366
- 2
- 9
-
1Setting to NO, will it enable or disable ARC ? Please mention clearly in your answer – Arshad Shaik Dec 24 '20 at 04:33