pipe理多个UILocal通知

我已经创build了多个UI本地通知,比如说100.我有一个UILocalNotifications数组,计划如下:

-(void) scheduleNotification{ AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; NSDateFormatter *formatter = [[NSDateFormatter alloc]init]; [[UIApplication sharedApplication] cancelAllLocalNotifications]; [self.notifications removeAllObjects]; for (int i = 0; i< [delegate.viewController.contactList count] ; i++) { UILocalNotification *localNotification = [[UILocalNotification alloc] init]; NSString *name = [[delegate.viewController.contactList objectAtIndex:i]objectForKey:NAME_KEY]; NSString *birthday = [[delegate.viewController.contactList objectAtIndex:i]objectForKey:BIRTHDAY_KEY]; if (birthday) { [formatter setDateFormat:@"MM/dd/yyyy"]; [formatter setLocale:[NSLocale currentLocale]]; [formatter setTimeZone:[NSTimeZone systemTimeZone]]; NSDate *date = [formatter dateFromString:birthday]; if (date == nil) { [formatter setDateFormat:@"MM/dd"]; [formatter setLocale:[NSLocale currentLocale]]; [formatter setTimeZone:[NSTimeZone systemTimeZone]]; date = [formatter dateFromString:birthday]; } NSCalendar *gregorianEnd = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents *componentsEnd = [gregorianEnd components:NSWeekdayCalendarUnit | NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit fromDate:date]; componentsEnd.year = [[NSDate date] year]; date = [gregorianEnd dateFromComponents:componentsEnd]; self.alarmTime = [date dateByAddingTimeInterval:self.mTimeInterval]; localNotification.fireDate = _alarmTime; localNotification.timeZone = [NSTimeZone defaultTimeZone]; localNotification.applicationIconBadgeNumber = 1; NSString *itemName = @"B'day Alert!!!"; NSString *msgName = [NSString stringWithFormat:@"Celebrate %@'s B'day",name]; NSDictionary *userDict = [NSDictionary dictionaryWithObjectsAndKeys:itemName,MessageKey, msgName,TitleKey, nil]; localNotification.userInfo = userDict; localNotification.soundName = self.soundName; localNotification.alertBody = [NSString stringWithFormat:@"Celebrate %@'s B'day",name]; [self.notifications addObject:localNotification]; } } } } 

我已经实现我的applicationDidEnterBackground委托为:

  - (void)applicationDidEnterBackground:(UIApplication *)application { UILocalNotification* notification; for (int i = 0; i< [self.settingVC.notifications count]; i++) { notification = [self.settingVC.notifications objectAtIndex:i]; [[UIApplication sharedApplication] scheduleLocalNotification:notification]; } } 

此外,在didReceiveLocalNotification委托我有这样的:

  - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { NSString *itemName = [notification.userInfo objectForKey:TitleKey]; NSString *messageTitle = [notification.userInfo objectForKey:MessageKey]; [self _showAlert:itemName withTitle:messageTitle]; application.applicationIconBadgeNumber = notification.applicationIconBadgeNumber-1; } 

但问题是,我没有得到所需的输出。任何帮助将不胜感激。 我知道,在一个应用程序可以只有有限的预定通知数量; 该系统保持最快的64个通知,并丢弃其余的。 那么,我将如何处理这100个或更多的UILocalNotification?