我在处理多个推送通知时遇到问题。当我解锁iphone并且(例如)我的应用程序有10个推送通知时,我的应用只注册了一些:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
if (launchOptions != nil)
{
NSDictionary *dictionary = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
if (dictionary != nil)
{
NSLog(@"Launched from push notification: %@", dictionary);
[self addMessageFromRemoteNotification:dictionary updateUI:YES];
}
}
}
如果我的应用程序已打开,则没有问题,所有收到的通知都会添加到阵列中。 谢谢