2

ARC stands for automatic reference counting.

I just upgraded my project to use ARC. Not all though. Just some.

How do I know?

jscs
  • 63,694
  • 13
  • 151
  • 195
user4951
  • 32,206
  • 53
  • 172
  • 282

3 Answers3

5

To see the default you have to check the target properties (Your Target -> Build Settings -> Apple LLVM Compiler - Language -> Objective-C Automatic Reference Counting)

Then you can change the setting for every .m file: Your Target -> Build Phases -> Compile sources -> you have a list of -m files and for each file a field "Compiler Flags". To disable arc for that file pass as flag -fno-objc-arc. To enable (if you have arc turned off by default) -fobjc-arc

EDIT: i added an image of a project.. enter image description here

Francesco
  • 1,840
  • 19
  • 24
  • @JimThio When you click on your project (in the File browser the "root" of the files tree) you have two options (in the main window): the project itself and a list of target. You have at least one target named as your application (and it also has the application icon.. you can't miss it!). Click on it and you will have all the options. I added a screenshot – Francesco May 21 '12 at 07:02
2

Look for the -fno-objc-arc flag on the files in your target's Compile Sources build phase, as shown in this answer.

Community
  • 1
  • 1
Kurt Revis
  • 27,695
  • 5
  • 68
  • 74
1

if at the source level, this question answers it: How do I know whether the compiler has ARC support enabled?

if at the build settings level, see -fobjc-arc or its inverse -fno-objc-arc. if not defined, defaults to off.

Community
  • 1
  • 1
justin
  • 104,054
  • 14
  • 179
  • 226