1.下载cocos2d。下载地址:https://code.google.com/p/cocos2d-iphone/ (最新为2.1)
2.安装。打开Terminal终端,进入cocos2d目录,输入./install-templates.sh
3.打开xcode,新建cocos2d项目。
ps:运行项目报错 command failed with exit code 1 (use -v to see invocation) ,进入Build Settings -> Deployment -> IOS Deployment Target ,改为IOS4.3