First, download cocos2d-xto the latest version. The download is cocos2d-1.0.1-x-0.9.2.zip. This version is compatible with iOS 5, so it may not be the latest version 1.0.1 when we see this article, so here is the download list address for everyone to select the desired version, http://code.google.com/p/cocos2d-x/downloads/list
Step 1: Download the engine package for the cocos2d-X, which has been given the address above;
Step 2: After the download is complete, Himi places it in the "document"; click Finder-click "document" on the left ");
Step 3: Start the terminal. Click Finder-go-utility-terminal)
Step 4: first use the command to enter the current "cd documents" to enter the Documents folder, continue to enter the folder command: "cd cocos2d-1.0.1-x-0.9.2", and then "sudo. the/install-templates-xcode.sh command starts to execute the installation command, which will prompt as follows:
- select the template version to install
- 3 for xcode3
- 4 for xcode4
- input nothing for all
- 4
Select the version corresponding to your Xcode, enter the corresponding number, and press enter to complete the installation.
OK, create a project below, and then Xcode appears the following interface, look at the left column, an additional Cocos2d-x, such:
Then the new cocos2d-X project is as follows:
Run it directly. The effect is as follows: