Learn Cocos2D 2 compiler warnings from source code

111 views Asked by At

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

1

There are 1 answers

0
Kreiri On BEST ANSWER

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 [email protected] 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;