0
15分ごとに繰り返したいコードにローカル通知を埋め込むようにしています。 NSCalendarUnit
のそれは価値、それはNsCalendarUnitを取り、repeatInterval
は時間ではありませんNSCalendarUnitローカル通知15分間隔の問題
UILocalNotification* localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:30];
localNotification.repeatInterval = 900.0;
localNotification.alertBody = @"Your alert message";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
はい、これを実行して正常に動作します。ありがとう – Waqas