The IOS program always calls the Application:didfinishlaunchingwithoptions: method when it starts, where the second parameter launchoptions an object of type Nsdictionary, which stores the reason why this program started.
1, if the user directly start, lauchoptions no data;
2, if the other application through OpenURL: Start, then the Uiapplicationlaunchoptionsurlkey corresponding object is the boot URL (nsurl), Uiapplicationlaunchoptionssourceapplicationkey the bundle ID of the source application that corresponds to the startup (NSString);
3, if initiated by local notification, then uiapplicationlaunchoptionslocalnotificationkey corresponding to the launch application of the local notification object (uilocalnotification);
4, if started by remote notification, then uiapplicationlaunchoptionsremotenotificationkey corresponding to the launch application of the remote Notification information userinfo (nsdictionary);
5, other key also has Uiapplicationlaunchoptionsannotationkey,uiapplicationlaunchoptionslocationkey,
Uiapplicationlaunchoptionsnewsstanddownloadskey.
Application:didfinishlaunchingwithoptions: