应用程序关闭后单击推送通知后固定启动画面(ios)

时间:2013-05-21 15:34:18

标签: ios apple-push-notifications splash-screen

当我关闭应用程序的远程通知横幅时,该应用程序已启动但仍保留在启动画面上。当我正常打开应用程序或在应用程序打开时单击远程通知时,这种情况不会发生。

-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

  self.window.rootViewController = self.tabBarController;
  [self.window makeKeyAndVisible];

  [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
  (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];

  return YES;
}

-(void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
{
   NSLog(@"My token is: %@", deviceToken);
}

-(void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
{
   NSLog(@"Failed to get token, error: %@", error);
}

-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
   NSLog(@"receive");
}

我该如何解决?

0 个答案:

没有答案