I plan such local notifications
+ (void) addLocalNotification: (Event *) event {
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.fireDate = event.scheduleTime;
localNotif.alertBody = @"Time to apply drops\nPlease press view to see details";
localNotif.soundName = ALARM_SOUND_FILE;
localNotif.timeZone = [NSTimeZone localTimeZone];
localNotif.applicationIconBadgeNumber = 1;
NSDictionary * dict = [NSDictionary dictionaryWithObjectsAndKeys:event.number,LN_EVENT_KEY, ACTION_EVENT, LN_ACTION_KEY, nil];
localNotif.userInfo = dict;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotif];
}
However, after the clock went ahead last weekend, the notifications scheduled before the clock went ahead shoot in an hour, i.e. 19:00 instead of 18:00
The apple documentation says that the “wall clock” time sets the time zone as described above.
Any suggestions are welcome.
source
share