Where to set automatic reference counting - xcode 4.2
Asked Answered
U

3

5

When I created my project, I checked the "Use Automatic Reference Counting" to on. Now, I'm thinking of turning it off but I can't find where to change it.

One more thing, is it advisable to use ARC for iPad/iPhone apps?

Ulema answered 6/2, 2012 at 4:25 Comment(0)
I
8

Open the project file. Under Build Settings tab search for "Objective-C Automatic Reference Counting". Set the value for it.

Yes, sure if you want to deliver a product for iOS 4.0 and above you can definitely use ARC.

Isomagnetic answered 6/2, 2012 at 4:32 Comment(2)
iOS 4.0 and above support ARC.Foust
@Apurv, can't find it under build settings... Is it possibly because i'm doing a phonegap project?Ulema
H
1

You can turn off "Use Automatic Reference Counting" by clicking on your project in the navigator (the top item in the finder-like thing on the left) click on your target, select "Build Settings" and turn off the option "Objective-C Automatic Reference Counting"

If programmer is novice than it is good advice to let them do it manually , otherwise his memory fundamentals will be never clear , Otherwise it is just fine to use it.

Hotblooded answered 6/2, 2012 at 4:34 Comment(3)
But then you could argue that those "memory fundamentals" are now obsolete. It's just a matter of opinion, I guess.Torrietorrin
Yup ... but you never know, Memory fundamentals were obsolete since many years and then iOS come and suddenly it woke up again. You don't know what future hold for Programming world ... ;)\Hotblooded
Hi @mihirmehta, can't find it under build settings... Is it possibly because i'm doing a phonegap project?Ulema
G
0

Go to the Project Menu->Target->Build Settings->Objective-C Automatic Reference Counting, then you can set here Yes or No. if You are a beginner and You can't handle memory issue yourself then you can enable ARC.

Gameto answered 6/2, 2012 at 4:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.