josh
josh

Reputation: 1689

Could not disable ARC in xcode4.2

I am working on ARC environment and I successfully disable Facebook API through -fno-objc-arc. I also want to disable this for my own class, and I did same method as with Facebook API classes, but I couldn't disable ARC. If anyone know please help me on that.

Upvotes: 2

Views: 161

Answers (2)

Manish Agrawal
Manish Agrawal

Reputation: 11027

To get rid of this error you need to disable ARC, to disable ARC from your project do the following steps.

Select your project file. You should be in the “Build settings” tab.
Select the “levels” option (default is “Combined”)
There’s a search field to the right of “Combined”. Enter “Automatic” Second group should be “Apple LLVM Compiler 3.0 – Language”.
Second line under that controls ARC. Click that line, then in the middle column (where it says “yes”), click and choose “no”.
Now the error should gone.

Upvotes: 2

jpalten
jpalten

Reputation: 533

Just to make sure you are doing this in the right place:

  • In the project navigator, click on the top item, the project name
  • In the pane that appears with project and targets, select the correct target where the non-arc file is included
  • Go to Build Phases, open Compile Sources
  • Select the file that needs to be non-arc, double click it, and enter -fno-objc-arc
  • Build.

So double check you did this, especially selecting the right target.

Upvotes: 0

Related Questions