6

I tried to install cocos2d framework to my xcode but I can't. I have Xcode version 3.2.5, cocos2d framework version 0.99.5, and iOS version 4.2.

I opened the terminal and entered

$ sudo /mac2/cocos2d-iphone-0.99.3/install-templates.sh

Terminal asks me for my password and I enter it. Everything seems going well; the terminal displayed "done". When I open Xcode, I do not see any cocos2d project in user templates (I do not see user template section in the new project list).What is the problem?

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
Adel
  • 648
  • 1
  • 9
  • 26
  • 1
    duplicate with solution: http://stackoverflow.com/questions/5287081/how-to-install-cocos2d-project-templates-in-xcode-4 – MetaGuru Apr 26 '11 at 21:45
  • Try Kobold2D (http://www.kobold2d.com), it has an installer that does this job for you. Kobold2D includes cocos2d. – CodeSmile Sep 14 '11 at 22:35

5 Answers5

3
sudo ./install-templates.sh

means to install for system wide. The template would appear in the system wide section.

For as user template, use -u option.

./install-templates.sh -u
Kazuki Sakamoto
  • 13,929
  • 2
  • 34
  • 96
2

This is a duplicate of :

How to install Cocos2d PROJECT templates in Xcode 4?

The solution is that you have to get the latest from github in order to get xcode 4 templates.

The solution link is here:

http://www.cocos2d-iphone.org/forum/topic/13782/page/2#post-82267

The github link is:

https://github.com/cocos2d/cocos2d-iphone.git

I just verified this works.

Community
  • 1
  • 1
rhigdon
  • 1,483
  • 1
  • 15
  • 20
1

I only use ./install-templates.sh -u -f and it works for me.

Mohd Haider
  • 673
  • 1
  • 5
  • 25
0

Do this:

In finder, go to your hard drive,

Go to Developer => Library and drag the cocos2d folder into this folder,

Next, open terminal, type cd , and drag the cocos2d folder into the terminal window.

Now do sudo ./install-templates.

That should work.

After, restart xcode.

Hope that helps.

tallen11
  • 1,387
  • 2
  • 17
  • 33
  • thanks but still the result of **sudo** command show that everything is good and when i open the **xcode** i **i don not see the user template section** – Adel Apr 05 '11 at 19:59
0

sudo ./install-templates.sh -u -f Don't forget the -f

Martin
  • 271
  • 4
  • 9
  • 1
    current version (1.0.0) will not let you run with both sudo and -u. "Either use the '-u' option or run it as root, but not both options at the same time." – Rayfleck Jun 09 '11 at 15:41