Tutorial: cocos2d Xcode Project: Get the Xcode Project Template here
Search my cocos2d for iPhone FAQs & Tutorials
Please note that the blog search in the upper right corner doesn’t search my FAQs and Tutorials.- Note: please do not share direct download links to PDF files, the download links expire after a couple minutes!
Previously, i asked readers to join my Newsletter. I changed my policy because i don't want you to feel forced to join, so the Newsletter is now a completely voluntary thing. You can now get the files here for free!
File Downloads
Download the Xcode Project (Cocos2D v0.99.4)
Download the Xcode Project (Cocos2D v0.99.5 beta 3 and later)
Note: Cocos2D v0.99.5 beta 3 includes many changes that broke the API as well as the Xcode project template. Please chose the project depending on the Cocos2D version you plan to use.
Download the Xcode Project template (Cocos2D v0.99.4 only), kindly provided by Tim Soliday from FastFinger Studios.
Comments (2)
164 Responses to “Tutorial: cocos2d Xcode Project: Get the Xcode Project Template here”
-
I get “cocos2d.h:No such file or directory” when trying to #import “cocos2d.h”
what am I missing?
-
ups, the path to the source code was wrong.
-
-
This tutorial is toooo long.
Is there a short version ? I spent two hours on this and as I expected nothing works.
For begininers its not going to work -
Great info! Thanks! However, the script is building the .ipa file before it does the codesign step. Have things changed in Xcode? How do I get the script to run after the codesign step?
-
I tried twice to follow your tutorial step by step using cocos2d 0.99.5-rc1, Xcode 3.2.5 and iOS 4.2.1, but I keep having problems when building and running on device.
The weird thing is I have no problem at all running the template on simulator!
To be more clear:
I’m trying to build and run following the final step of “Getting our Project Template to build minimal cocos2d code” section.
Running on simulator works perfectly, running on device (iphone4) crashes after splash screen with this message on console:
“Program received signal: “EXC_BAD_ACCESS”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
Previous frame inner to this frame (gdb could not unwind past this frame)”
By stepping with debugger I found the app crashes on line 98 of AppDelegate.m:
“// make the View Controller a child of the main window
[window addSubview: viewController.view];”I see there are little differences from your (great) tutorial and Xcode/cocos2d new templates, mainly for the use of RootViewController, may this crash be related? (I already added RootViewController.* to my template)
Has anyone found a fix to this problem?
Please please please help me, this thing is driving me crazy =/
Thanks










May 7, 2010 13:32
Very nice tutorial, congratulations! It's very well written and you pay attention to details.
The only thing that I misunderstood is the title of the tutorial. When you said "Template" I thought we were going to create an actual XCode Template. But I don't see it now. You have to copy it every time and rename it, right? Wouldn't it be possible to transform it in a real template?
Thanks anyway!
May 10, 2010 06:15
Thank you! Yes, that's correct i did not create a Template that you can select in the "New Project" Xcode dialog. I understand that it is a bit misleading but the New Project dialog actually only gives you a bit of convenience by allowing you to name the project before you create it. The disadvantag is (for me at least) that with a real Template you can't have the project in source control, which is why i created this Xcode project to begin with. To have a base project that i can branch off of using my source control software and later integrate changes to other projects or back to the base project.