Introduction to physics on the iPhone Part 1: Install Cocos2D with XCode
The first thing we need to do is set up Cocos2D with our version of XCode. If you already have Cocos2D setup you can skip to the next section Part 2: Creating a Cocos2D enabled project.
Cocos2D is the most popular Game Engine available for the iPhone. It's free, powerful and easy to use. The first thing we need to do is download the latest version of Cocos2D here. I'll be using the latest version: 2.0-rc1.
|Figure 1: Installing Cocos2D using the Terminal|
Setup Cocos2D with XCode
Cocos2D comes with an install script which we need to run. The script will automatically setup some XCode profiles for us. The profiles allow you to create a new Cocos2D project in XCode which will automatically setup all the necessary libraries for you. Unzip the folder you downloaded and locate the install-templates.sh file. Next open up a terminal window (Applications/Utilities/Terminal) and drag the install-templates.sh file into the terminal window. Finally, add the following commands "-f".
And that's it. The next step is to create a new XCode project with Cocos2D and Box2D enabled: Part 2: Creating a Cocos2D enabled project.