Use the documentation

Let’s have a look at how the startup of an iPhone app works. The entry point is the main.m file in your project:

main.m

This does some basic setup:

int main(int argc, char *argv[])
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;
}

Important here is the UIApplicationMain call which initializes the app. To learn more about UIApplicationMain (or about anything), have a look at the documentation. Go to Xcode > Preferences > Documentation and click GET for the iOS Library. This will download all the available documentation:

Download iOS Library Documentation

After it finishes downloading, select UIApplicationMain in the source code file and click Help > Search Documentation for Selected Text:

UIApplicationMain documentation

Hint: Configure a convenient key binding for Help > Search Documentation for Selected Text in Xcode > Preferences > Key Bindings:

Hotkey for documentation

Ralf Ebert

Ralf Ebert is an independent software developer and trainer. He makes apps for Mac OS X and iOS and offers iOS and Git training courses for software developers.