Oscar Gomez
Oscar Gomez

Reputation: 18488

XCode 4.2 and ARC, why is it not turned on for me?

I just installed XCode 4.2, according to to everything I have read ARC is turned on automatically, and you have to go to build phases and flag the files where you want to manage memory by yourself, which I have not done, yet it works like if I had.

The weird thing is that everything is still working fine for me, just like if I was still working with XCode 4, is this normal?. From what I read I am supposed to get thousands of warnings because I can no longer use release, retain and autorelease but I am not.

Upvotes: 4

Views: 553

Answers (1)

Philipp Schlösser
Philipp Schlösser

Reputation: 5219

Since ARC is a build setting, I don't know how it should be turned on by default. It's always on for new project but I guess you are talking about existing ones. You can check if it's turned on under BuildSettings (check All) Objective-C Automatic Reference Counting. Turn it on and you'll get your warnings :)

However, I would highly recommend using Edit->Refactor-> Convert to Objective-C ARC since it's more reliable than migrating you code by your own. You can still choose to chance certain files personally if you like.

Upvotes: 2

Related Questions