I’m issuing a local notification alert (iOS 5) that will repeat its reminder periodically (every minute) until the user acknowledges it by setting repeatInterval on the UILocalNotification instance added to [[UIApplication sharedApplication] scheduleLocalNotification:
The effect of setting ‘repeatInterval’ is that each time the notification is repeated while not acknowledging it, there’s another entry in the Notification Center. e.g: After 5 minutes of not ack’ing the firing, there are 5 separate entries in the Notification Center.
Is there way to only have one entry, but sound/vibrate alert every 1 minute?
Here’s how I’m creating the local notification:
UILocalNotification *localNotify = [[UILocalNotification alloc] init];
localNotify.fireDate = aFireDate;
localNotify.timeZone = [NSTimeZone defaultTimeZone];
localNotify.userInfo = userInfo;
// 3. Configure the substance of the notification: alert, icon badge number, and sound.
localNotify.alertBody = NSLocalizedString(alertTitleText, nil);
localNotify.alertAction = NSLocalizedString(alertActionText, nil);
localNotify.soundName = UILocalNotificationDefaultSoundName;
localNotify.applicationIconBadgeNumber = 1;
localNotify.repeatInterval = NSMinuteCalendarUnit;
// Schedule the local notification for delivery.
[[UIApplication sharedApplication] scheduleLocalNotification:localNotify];
Unfortunately no. As long as the user has Notification Center turned on for your app, every local notification you fire will show up as a distinct entry in Notification Center; even if they are multiple firings of the same UILocalNotification object. The UILocalNotification API gives you no control over this.