简体   繁体   中英

Does iOS invalidates localNotifications if the user modifies the date/time

If current date is 20-November-2012 9:00 AM, in my app if I schedule a local notification with firedate say 21-November-2012 10:00 AM and run my application and if I modify the date/time in settings to some previous date say 18-November-2012 I will get the notification properly when the date/time reaches the firedate.

But if I change the date/time to any upcoming date say 30-November-2012 10::PM in device settings I am not getting the notification. Does iOS invalidates localNotifications if the user sets the the date/time to any upcoming date.

When you fire a LocalNotification that notification will get registered into the OS.OS present the notification on time.You can see the notifications your App has registered using the code

`[[UIApplication sharedApplication] scheduledLocalNotifications]`

You CANT edit any notification that is already registered in the OS.

If you want to edit any notification , cancel the previous notification and fire a new one using the updated firedate.

I never understood how you get a notification in 18-November-2012 if the current date is 20-November-2012 9:00 AM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM