I want to make the UILocalNotification
with the date user selected, but if user does not tap on the Notification bar to launch app, will continue to push the Local notification after 10s. That means the app will push the 2 Local notifications:
- The main Local notification with the date time user selected
- The repeat local notification every 10s.
I tried this code but it's not work:
UILocalNotification *reminderNote = [[UILocalNotification alloc]init];
reminderNote.fireDate = _selectedDate;
reminderNote.repeatInterval = NSSecondCalendarUnit;
reminderNote.alertBody = @"some text";
reminderNote.alertAction = @"View";
reminderNote.soundName = @"sound.aif";
[[UIApplication sharedApplication] scheduleLocalNotification:reminderNote];
reminderNote.fireDate = [NSDate dateWithTimeIntervalSinceNow:10];
[[UIApplication sharedApplication] scheduleLocalNotification:reminderNote];
Thanks in advance.