I try to repeat a local notification every Monday. I found localNotification.repeatInterval = kCFCalendarUnitWeekOfYear;
but I am not sure if it works. How can I show all local notification times in the future?
[[UIApplication sharedApplication] cancelAllLocalNotifications]; NSDate *today = [NSDate date]; NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; [gregorian setLocale:[NSLocale currentLocale]]; NSDateComponents *nowComponents = [gregorian components:NSCalendarUnitYear | NSCalendarUnitWeekOfYear | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond fromDate:today]; [nowComponents setHour:18]; [nowComponents setMinute:05]; [nowComponents setSecond:00]; [nowComponents setWeekday:2]; NSDate * notificationDate = [gregorian dateFromComponents:nowComponents]; UILocalNotification* localNotification = [[UILocalNotification alloc] init]; //localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:5]; localNotification.fireDate = notificationDate; localNotification.repeatInterval = kCFCalendarUnitWeekOfYear; localNotification.soundName = @"localNotification_Sound.mp3"; localNotification.alertBody = @"Message?"; localNotification.timeZone = [NSTimeZone defaultTimeZone]; [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];