cocos2d for iPhone Xcode Project Template

Jul 24, 2009   //   by Derek van Vliet   //   Development  //  4 Comments

Wouldn’t it be nice if you could fire up Xcode and create a new cocos2d iPhone project using the New Project wizard? Thanks to these instructions, you can do just that. This was easily the most useful thing I came across today.

The following assumes you have git installed, which you can download here.

Determine your Xcode root directory. For example, I have Xcode for iPhone OS 2.0 in /Developer and Xcode for iPhone OS 3.0 in /Developer3.0

To set up this project template, add it to: /Developer3.0/Library/Xcode/Project Templates/Other by creating a sub-directory there, and then, from within the sub-directory, get the code with:

git clone git://

If you haven’t already, get the latest cocos2d tarball from and untar it.

Under the global Xcode preferences, add (or update if it already exists) a Source Tree called COCOS2D_SRC. Make it point to the top-most cocos2d directory, like /Developer/Library/cocos2d-iphone-0.8-beta/

You should now be able to create a new cocos2d project from this template (it should be somewhere at the bottom of the list when you go to File -> New Project).

Static linking is awesome.

It sure is! Here’s the end result:



Leave a comment

Our Games

Latest Tweets