Okay, now I know UILocalNotifications are cleared by the system if the firedate has past ie they’ve expired but when are they cleared? Does it only happen if you’re app is not running?
Okay, now I know UILocalNotifications are cleared by the system if the firedate has
Share
I’m not sure what you mean by “cleared” in this context, but according to the documentation, apps will only keep the “soonest-firing 64 notifications.” After you reach 64, the oldest notifications will be discarded by the system. Beyond that, the only way I know of that notifications disappear is when a user manually clears them from Notification Center.
If you’re talking instead about canceled notifications, then you might take a look at the UIApplication method
-cancelLocalNotification:, which cancels a scheduled notification and dismisses it if it’s visible. If you’re looking to forcibly clear notifications, this method might be the one for you.