I would like to clarify this issue. I had installed Cocos2d 1.01 rc on my iMac, with XCode 4.3 installed, and I have now dowloaded v2.0 and wanted to install the templates (following the official guide). Unfortunately the terminal gives me permission denied messages on trying this operation.

I thought all I needed to do was a "sudo su" command and then a chmod and that's what I tried to do:

sudo su
chmod -R 0777 /Users/xxx/Library/Developer/Xcode/Templates/*

The result of this is which seems fine to me (read, write and execute on all subdirectories of Templates):

ls -l /Users/xxxx/Library/Developer/Xcode/Templates/
total 0
drwxrwxrwx   4 root  staff  136 20 Giu 17:30 File Templates
drwxrwxrwx  19 root  staff  646 15 Mar 15:14 cocos2d

But when I install the templates I get the following, which I don't quiet get.. It say "DONE!" but there are several errors in the terminal that say that was not possible to create directories because of permission (even if they all seem to have r,w,x set). Also, well I try to create an empty Cocos2d project via XCode (after rebooting XCode) the cocos2d.m still shows version v1.0.1.

For clarity here is the log from terminal after attempting to install the templates (I am a bit lost):

./install-templates.sh -f
cocos2d-iphone template installer



Installing Xcode 4 cocos2d iOS template
----------------------------------------------------

...creating destination directory: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
mkdir: /Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x: Permission denied
...copying cocos2d files
rsync: mkdir "/Users/xxx/Library/Developer/Xcode/Templates/cocos2d v2.x/lib_cocos2d.xctemplate/libs
Edit
Report