MacOS X Application initialization and shutdown sequence

Perhaps this is it?

  1. main.m calls the NSApplicationMain function.
  2. init methods of classes in the main nib file
  3. awakeFromNib called on classes instantiated by the nib
  4. [NSApp run]
  5. [NSApp finishLaunching]
  6. Any windows in the nib that were marked as ‘visible at launch time’ are put on screen about now.
  7. applicationWillFinishLaunching:
  8. application:openFile:
  9. applicationDidFinishLaunching:
  10. <run main loop>
  11. applicationShouldTerminate:
  12. reviewUnsavedDocumentsWithAlertTitle:cancellable:delegate:didReviewAllSelector:contextInfo:
  13. closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo:
  14. <didReviewAllSelector>
  15. applicationWillTerminate:

Updated to add information from this post.

Leave a Reply