How do I install the cocos2D templates for Xcode?

October 13, 2012 in cocos2D, iOS, Recipes, Xcode by Francesco Zuliani

cocos2D is an open source framework for creating 2D games on a variety of different platforms. The Mac OS X / iOS porting includes some useful templates for Xcode providing the backbone code for a new cocos2D application. After they are installed, they will be available in the “New Project” window of Xcode.

To install the cocos2D templates for Xcode, follow these steps:

  1. Download the latest version of cocos2D here.
  2. Unpack the archive in a location of your choice. From now on, we will refer to this location as [cocos2Dpath].
  3. Open a terminal (located in /Applications/Utilities/Terminal).
  4. Type cd [cocos2Dpath] and then press Return.
  5. Type ./ -f and press Return

Note: the -f flag forces the installation of the templates if an older version is already present.