Monday, December 28, 2015

Application lifecycle

Chronology of an application: When the process is started, it runs the NSApplicationMain function, which creates an instance of NSApplication. The application object reads the main nib file and unarchives the objects inside. The objects are all sent the message awakeFromNib. Then the application object checks for events.
This lifecycle of a typical cocoa application is depicted in the below diagram.