Reputation: 435
I'm working in a project that need to have same parts native (cocoa touch) and some parts in cocos2d. I have made the all the native and now I need to integrate cocos2d in the project. My problem is that i cant add with success the cocos2d library to my project. Any good solution to do that? I'm using xCode 4
Upvotes: 7
Views: 4761
Reputation: 143
Once you have downloaded the Cocos2d version from the link above, you need to open 'terminal' and drag the install-templates.sh file into the terminal window.
Everyone kept saying "drag the directory into terminal then type the above" but it comes back saying 'is a directory'. I searched for ages to do this and found this answer.
Once you have dragged the install-templates.sh file from the Cocos2d directory, hit return and it installs the Cocos2d templates to your Xcode directory.
Then you can open a project in Xcode and it has the templates ready for you.
Upvotes: 1
Reputation: 345
You essentially have two choices.
Option 1: Add cocos2d files to your existing project
Option 2: Install your existing code into a fresh project using the cocos2d templates
The latest version of cocos2d (1.0-RC) has XCode 4 templates. Install them:
install-templates.sh --force
Then create a new cocos2d project using those templates in XCode 4. Add your existing files and update the project that it creates, and you should be good to go.
Personally, I've had better luck with Option #2, but most of my code is pretty easy to move around.
Upvotes: 5