Game Development Reference
The main.m file is the entry point for each application; it contains the main method.
The Kobold2D implementation simply calls its internal method KKMain :
int main(int argc, char *argv)
return KKMain(argc, argv, NULL);
KKMain takes both argc and argv arguments and a third, optional parameter that
can be used to pass additional parameters to the start-up process if needed. Because
that's rarely, if ever, needed, you can just pass NULL . KKMain hides the complexity of
launching the app for either the iOS or Mac OS platform. It also initializes Lua and
parses the config.lua file, which provides app configuration settings. I discuss the
config.lua file in the next section.
At this point, it makes sense to show you the AppDelegate class of a Kobold2D
project, or, rather, what's left of it. Here's the interface:
@interface AppDelegate : KKAppDelegate
Nothing there. Maybe there's more in the implementation part of the app delegate?
// Called when Cocos2D is fully setup and you are able to run the first scene
Nope. I can already hear you: dude, where's my app delegate?