Install cocos2d for xcode4

I download cocos2d iphone 1.0.0 and cocos2d 1.0.0 beta template for xcode4 and I want to use cocos2d in xcode4.

How to install it?

+4
source share
5 answers

Take the downloaded folder and follow the link:

Macintosh HD => Developer => Library => Xcode => Templates

Just release the folder to this templates folder, restart xcode, and you should be fine to go!

Hope this helps!

+4
source

Download Cocos 2D from 1) download Cocos2D

2) unzip the file

3) Open the Terminal Window application → Utilities-> Terminal

4) Enter cd, drag and unzip the cocos2D open disk file.

5) Type sudo to drag the file 'install-templates.sh' from the downloaded file.

6) Enter your password

7) Restart Xcode, then you are working with Cocos 2D

enter image description here

+1
source

1-open folder cocos2d
2-open terminal window
3-type: sudo
4th drag file: install-templates.sh (cocos2d) folder and return

start xcode and a new project

0
source

If the same problem still exists, then the following code is deleted in the script and puts all things in the next path and deletes the next code in the script.

The way to put all things

Macintosh HD => Developer => Library => Xcode => Templates 

Remove this code in the script

 # Make sure root is not executed if [[ "$(id -u)" != "0" ]]; then echo "" echo "Error: Do not run this script as root." 1>&2 echo "" echo "'root' is no longer supported" 1>&2 echo "" echo "RECOMMENDED WAY:" 1>&2 echo " $0 -f" 1>&2 echo "" exit 1 

Then save the install-templates.sh file

and then follow these steps.

1) Open the Terminal Window application → Utilities-> Terminal

2) Enter cd, drag and unzip the cocos2D open source file.

3) Type sudo to drag the file 'install-templates.sh' from the downloaded file.

3) Enter your password

4) Restart Xcode, then you are working with Cocos 2D

This is ridiculous, but solve my problem.

0
source

I had problems with this and nothing worked above, I kept getting "No such file or directory" .

What worked for me was cd to the cocos2d folder, which I unzipped to my desktop as follows:

 cd Desktop/cocos2d-iphone-2.0/ 

Then I ran the shell installation script as follows:

 ./install-templates.sh 

Bingo! It's in! Hope this helps someone.

-1
source

All Articles