How can I include cocos2d-x templates in Xcode?
It doesn't exist anymore. You need to use create_project.py inside tools/project-creator in terminal.
-> python create_project.py [params]
example:
-> python create_project.py -project MyGame -package com.MyCompany.AwesomeGame -language cpp
I know, it really sucks. But it's better for creating multi-platform projects.
@marcg11's answer is valid for Cocos2d-x version 2.*. Script create_project.py
doesn't exist in version 3.1 anymore. You should use "cocos" console instead.
E.g. In a terminal go to a folder you want to create your project in and run:
cocos new Cocos2DxFirstIosSample -l cpp -p org.cocos2d.Cocos2DxFirstIosSample
You may also specify other parameters:
$ cocos new --helpusage: cocos new [-h] [-p PACKAGE_NAME] -l {cpp,lua,js} [-d DIRECTORY] [-t TEMPLATE_NAME] [--no-native] [PROJECT_NAME]Creates a new projectpositional arguments: PROJECT_NAME Set the project nameoptional arguments: -h, --help show this help message and exit -p PACKAGE_NAME, --package PACKAGE_NAME Set a package name for project -l {cpp,lua,js}, --language {cpp,lua,js} Major programming language you want to use, should be [cpp | lua | js] -d DIRECTORY, --directory DIRECTORY Set generate project directory for project -t TEMPLATE_NAME, --template TEMPLATE_NAME Set the template name you want create fromlua/js project arguments: --no-native No native support.
The README.md
file that comes with cocos2d-x v3.2 now says to use the cocos script to create new projects:
cocos new MyGame -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR
reference: