HTML and CSS Reference
CreatING a prOJeCt FOr IOS
For ios, follow these steps.
install Xcode from the app store.
open your web browser, and navigate to the Cocos2d-x download page.
get the latest stable version of Cocos2d-x, and extract it to a location of your choice. this
sample game used the latest version Cocos2d-x at the time of writing, which was v2.2.2.
open terminal app. use the cd command to switch to the directory where you extracted the
Cocos2d-x archive, like so:
Create the project using create_project.py , as follows:
./create_project.py -project HalloweenDefence -package org.Cocos2dx.HalloweenDefence
If you see the information shown in Listing 24-25, the project has been created successfully.
Listing 24-25. Successful Project Creation Log
proj.ios : Done!
proj.android : Done!
proj.win32 : Done!
New project has been created in this path:
As described above, create_project.py automatically creates iOS, Android, and win32 projects.
Adding Resources to the Project
Copy all files under the /HalloweenDefence/Cocos2d-html5-v2.2.2/HalloweenDefence of Cocos2d-Html5 project
to directory ~/work/HalloweenDefence/Cocos2d-x-2.2.2/projects/HalloweenDefence/Resources of the Cocos2d-x
JSB project. Your HalloweenDefence Resources group should now look like the image shown in Figure 24-22 .