Question

I bought the learn cocos 2d book by Steffen Itterheim today and loaded up one of the source code projects he provided for a basic application. The project compiles fine but without altering any of the code from the project I already have three compile warnings. I know that the book is out of date and that I'm using an out of date version of cocos2d for compatibility but is there anyway to get rid of these warnings? I don't know anything about the framework so I don't want to go messing around and trying to fix them myself especially since the program still compiles regardless.. THANKS!

enter image description here

Was it helpful?

Solution

Reasons for your warnings are exactly what they say.

One warning is because the project was created in older version of Xcode. The dialog in your screenshot even tells you which settings should be changed.

Second warning is because there is no Default-568h@2x.png file in your project. It's a launch image for 4-inch iPhone and is required to enable non-letterboxed screen.

Third warning tells you that there is an uninitialized variable. There's probably something like

NSData *imageData;

on that line. Just add initialization to nil in that line:

NSData *imageData = nil;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top