I'm following a Cocos2d tutorial and according to it, I have to send a command to a terminal to get it to downloads templates on Xcode or something. This is what it wants me to do:

After you pull down the code, you’ll want to install the useful project templates. Open up a Terminal window to the directory you downloaded Cocos2D to, and enter the following command:

./install-templates.sh -f -u

I tried putting that command in but it said "no such file or directory". What do I do?

By the way, my Cocos2d is downloaded in my downloads folder

EDIT: I figured it out. I had to use cd Downloads to get to my downloads, then I had to go to one more folder. After putting the above command in, it worked.

  • Type Cmd + Space to open Spotlight
  • Search for "Terminal" and open it
  • Type cd ~/Downloads/ This Changes Directory to your downloads folder
  • Type ./install-templates.sh -f -u to install the templates.

This should have installed the Xcode templates. Restart XCode and attempt to make a new project, you should have cocos2d options.


The easiest way to get to a particular directory in the Terminal is to do the following:

  1. In the Finder navigate to the just above the directory you want to go to.
  2. Drag the directory you want to go to onto the Terminal application icon. A Terminal window will open with you already in the directory you dragged.

From there you just need to follow the directions and type the following in the new Terminal window:

./install-templates.sh -f -u

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.