毎分ローカル通知を送信したいのですが、これは私が使用しているコードです:
[[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];
通知は 1 回だけ開始され、繰り返されることはありません。どこで間違えますか?