The easiest way to enable ARC for cocos2d

There are plenty of ways to enable ARC for a cocos2d project but I find by far the easiest and fastest is the following method.

1. Create a new project from the cocos2d templates.

Transient

2. Open the XCode ARC converter tool

Transient

3. Select only the following files, none of the actual cocos2d engine. Push the check button.

Transient

4. Xcode will analyse the project and will then show the changes required. We can see that it correctly assigns __weak to the director iVar.

Transient

5. Select save and that's it! An ARC enabled cocos2d project, ready to go!

Transient