我正在尝试安排一个本地通知,一旦通知被触发,它将在每 1 秒后重复一次。应用程序启动后 10 秒触发通知。
UILocalNotification *notif = [[cls alloc] init];
notif.fireDate = [[NSDate alloc]initWithTimeInterval:10 sinceDate:[NSDate date]];
notif.timeZone = [NSTimeZone defaultTimeZone];
notif.alertBody = @"Did you forget something?";
notif.alertAction = @"Show me";
//notif.soundName = UILocalNotificationDefaultSoundName;
notif.soundName = @"applause-light-01.wav";
notif.applicationIconBadgeNumber = 1;
notif.repeatInterval = NSSecondCalendarUnit;
[[UIApplication sharedApplication] scheduleLocalNotification:notif];
即使我已经使用过notif.repeatInterval = NSSecondCalendarUnit
,通知会在 60 秒后重复。我做错了什么?