ARC (Automatic Reference Count) was introduced with XCode 4.2. This means that you no longer have to release, autorelease, or retain in your code. This makes it easier when writing code but a little difficult when importing or copying code snippets from existing code written for older versions. You might get errors such as
'release' is unavailable: not available in automatic reference counting mode
or
ARC forbids explicit message send of 'release'
or
ARC forbids explicit message send of 'autorelease'
'release' is unavailable: not available in automatic reference counting mode
or
ARC forbids explicit message send of 'release'
or
ARC forbids explicit message send of 'autorelease'
To avoid these errors, you can disable arc for your imported files. Here is how:
1. Click on your project in the Project Navigator, and then on the Target.
2. Under "Build Phases", expand "Compile Sources".
3. Click on the file you want to edit and type in -fno-objc-arc. It should appear in the "Compiler Flags" column.
3. Click on the file you want to edit and type in -fno-objc-arc. It should appear in the "Compiler Flags" column.