Tutorial: cocos2d Xcode Project: Get the Xcode Project Template here Comments Feed" href="http://www.learn-cocos2d.com/knowledge-base/tutorial-professional-cocos2d-xcode-project-template/feed/"/>

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!

Download Lesson PDF

File Downloads

The latest version is available via Github. Current github version works with cocos2d v0.99.5 rc0.

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)

  1. Receptor

    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!

  2. Steffen Itterheim

    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.

Tutorial Poll

What cocos2d or programming How-To/Tutorial would you like me to create? Choose up to three:

View Results

Loading ... Loading ...

164 Responses to “Tutorial: cocos2d Xcode Project: Get the Xcode Project Template here”

  1. Carl says:

    I get “cocos2d.h:No such file or directory” when trying to #import “cocos2d.h”

    what am I missing?

  2. vik says:

    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

  3. Norm says:

    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?

  4. zutroi says:

    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

    • It might be related. Have you tried the version on github? https://github.com/GamingHorror/cocos2d-project
      That version is tested with 0.99.5

      But I recently started getting those “could not unwind” errors … I was able to fix them by changing the compiler in all referenced projects back to GCC.

      • zutroi says:

        Bingo!
        Thanks a lot, you point me to a fix.
        I had already tried with your latest github version, without luck.
        I followed your suggestion, changing the compiler to GCC 4.2 on all projects (both cocos2d-project and cocos2d-ios) and it worked!
        I suppose the problem was in compiler setting for cocos2d-ios, it was set to LLVM compiler 1.6.
        If I set compiler to different version for the two projects, I always get that crash, when using same gcc version, everything is ok.
        I tried also with LLVM GCC4.2 on both projects and it works too.

        Probably I never met this problem since using cocos2d built-in templates everything get compiled using gcc without further setting.
        Thanks a lot for your tutorials… and for fast replying too ;)

Leave a Reply