I want to send local notification every minute and this is code that I'm using:
[[UIApplication sharedApplication] cancelAllLocalNotifications];
UILocalNotification *notif = [[UILocalNotification alloc] init];
if (notif == nil) {
return;
}
notif.timeZone = [NSTimeZone defaultTimeZone];
notif.alertBody = @"Test notification!";
notif.alertAction = @"View";
notif.soundName = UILocalNotificationDefaultSoundName;
notif.applicationIconBadgeNumber += 1;
notif.repeatInterval = NSMinuteCalendarUnit;
[[UIApplication sharedApplication] scheduleLocalNotification:notif];
The notification starts only once and never is repeated. Where I make mistakte?