Reputation: 2408
I am setting around 370 UILocalNotification
s but I can only set 64...
for(int i = 0 ; i<[arr count] ; i++){
UILocalNotification* alarm = [[UILocalNotification alloc] init];
// Create a new notification.
if (alarm)
{
alarm.fireDate = indDate;
alarm.timeZone = [NSTimeZone defaultTimeZone];
//alarm.repeatInterval = NSMinuteCalendarUnit;
alarm.soundName = @"alarmsound.caf";
alarm.alertBody = @"Message";
[app scheduleLocalNotification:alarm];
[[UIApplication sharedApplication] scheduleLocalNotification:alarm];
}
}
Upvotes: 5
Views: 1431
Reputation: 111
It seems that in iOS 8.1 it is possible to schedule more than 64 notifications and all get fired. In my app I tested it with 500 and more local notifications and all get scheduled and fired on iPhone Simulator an on a real iPhone 5s. Maybe this is a bug in iOS 8.1 or Apple forgot to update the documentation.
Upvotes: 2
Reputation: 11026
Maximum limit is 64. I have also the same problem where i need to schedule many notifications. I have scheduled 64 notifications and when the app again opens I will schedule the remaining notifications.
Upvotes: 6
Reputation: 7938
You can set at most 64 local notifications to system, one trick is that repeated notification is treated as one notification no matter how many times or how frequently it repeat.
Upvotes: 1