application 几个方法
1,- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
2,- (void)applicationWillResignActive:(UIApplication *)application(意外中断)
3,- (void)applicationDidEnterBackground:(UIApplication *)application(home键)
4,- (void)applicationWillEnterForeground:(UIApplication *)application(启动应用)
5,- (void)applicationDidBecomeActive:(UIApplication *)application(活动状态)
6,- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification NS_AVAILABLE_IOS(4_0);本地通知
7,- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo NS_AVAILABLE_IOS(3_0);远程通知
8,- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken NS_AVAILABLE_IOS(3_0);注册通知,设备id