My professional cocos2d Xcode Project Template

On May 1, 2010, in Announcements, by Steffen Itterheim

I spent the last week creating a Xcode project template that uses the cocos2d for iPhone as cross-referenced project as it is obtained from git. I want to be able to branch off of a common base project using the source control software of my choice – Perforce – and also be able to update the cocos2d for iPhone game engine at any time for all of my future projects.

I think the feature list of that Xcode Project Template speaks for itself:

  • cocos2d-iphone referenced by Project, allowing you to keep cocos2d-iphone up to date with the least amount of work
  • 4 Build Configurations (Debug, Release, Ad Hoc Distribution and App Store Distribution)
  • IPA Files automatically created for Ad Hoc Distribution builds
  • ZIP Files automatically created for App Store Distribution builds
  • Build Targets to build regular iPhone/iPod and iPad Apps in both Full and Lite Versions
  • additional Build Targets to debug memory crashes effectively and running the Static Analyzer
  • Preprocessor Macros to differentiate the different build targets in code
  • Aggregate Target to build all your regular Targets at once
  • properly configured precompiled Prefix Headers, reducing compile times
  • supports both Physics engines: Chipmunk and box2d
  • all build settings optimized for maximum performance and building quality code, taking into account Xcode’s Layered Build Settings

It gets better! I’ve actually made tutorial explaining each and every step in detail and explained some of the reasons and intricate details of Xcode Build Settings. I’m confident it’ll blow your socks off! This Tutorial combines everything useful that has ever been written about Xcode & cocos2d Project setup into one large Tutorial. And i can guarantee that it’ll work because it describes exactly how i created the Project Template i’m now using for my professional work.

Of course i will also share that Xcode Project Template. This is all content for my new Website which focuses on making games with the cocos2d for iPhone game engine. I hope to be able to reveal the website soon, until then you’ll have to be a little more patient. Please stay tuned and follow me!

For now i’d like to offer you a Teaser for this Tutorial: Git Setup for cocos2d for iPhone. Please do me a favor and do not link to this HTML file directly, instead link to this post, as i will remove the HTML as soon as the new website goes live. Also the HTML isn’t formatted properly, for a better result download the PDF version of the cocos2d Git Setup Tutorial. It contains the first 11 pages of the 93 (!) pages Tutorial!


There’s only one issue left that i just can’t explain: running the static analyzer only reveals results in Release builds but not in Debug builds. In Debug builds the analyzer analyses all files but doesn’t complain about anything. Not even after i temporarily replaced it with the latest version of the Static Analyzer as described in this tutorial. My post on Stackoverflow at least lead me to discover that it doesn’t have anything to do with GCC vs LLVM GCC but only with the Debug builds. I then compared the Build Settings of Debug and Release builds and other than the preprocessor macro DEBUG and RELEASE and of course optimization level they were identical. I still tried to make all Build settings identical to the Release build but no change. This is so weird. The command line scan-build analyzer works just fine but not with the Xcode built-in Build & Analyze. If you have any idea what could be causing this behavior please let me know! Otherwise i’ll probably have to live with analyzing only release builds respectively going back to the command line scan-build.

Tagged with:  

Comments are closed.