UILocalNotification *localNotification = [[UILocalNotification alloc] init];
if (localNotification == nil)
return;
//localNotification.fireDate = [NSDate dateWithTimeInterval:timeInterval sinceDate:now];
localNotification.fireDate = [NSDate date];
localNotification.repeatInterval = 5*NSSecondCalendarUnit;
localNotification.alertBody = @"Your alert message";
[[UIApplication sharedApplication] cancelAllLocalNotifications];
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
This code generates notification after first 5 second then it goes back to NSMinuteCalendarUnit, I have been trying to work around with this but no help.
I want to set notifications every 5 seconds and then it should fire it until i forcefully want to stop it.
Can somebody please help??