Posted immediately after the application finishes launching.
That’s what the Apple docs state. But I don’t see how an object could receive this notification. It would have to add itself as an observer, but the earliest it could do this is in the application:didFinishLaunchingWithOptions: method. At that moment, the notification has already been posted. I don’t see any use for this notification, or am I overlooking something?
Assume you have some object of class “MyController” in the root of your “Main Nib File” (as specified in your target’s properties – the default is called “MainWindow.xib”). When your app launches and this main nib file is loaded, all objects in the nib file receive an
-awakeFromNibmethod, including your MyController instance. In there, the instance could add itself as an observer of the UIApplicationDidFinishLaunchingNotification. When the loading of the Main Nib File is finished (and some other startup stuff), and the UIApplicationDelegate receives the-application:didFinishLaunchingWithOptions:message, your MyController instance receives the notification.Another (probably not very common) case for registering for this notification would be if you instantiated some Objective-C class directly in the main.m file before
UIApplicationMain()is called and wanted to know when your app actually did start.