RJV Kumar
RJV Kumar

Reputation: 2408

How many uilocalnotifications can set at a time?

I am setting around 370 UILocalNotifications 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

Answers (3)

Andreas Bogavčić
Andreas Bogavčić

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

Manish Agrawal
Manish Agrawal

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.

For more Info

Upvotes: 6

MeloS
MeloS

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

Related Questions