I’ve read a lot of threads and tutorials about UILocalNotifications and I’m confused about the ‘close’ button. For example, this one is linked to a lot: HERE
When I use a UILocalNotification set for every 5 seconds (as a test) and I tap the ‘close’ button, the notifications stop. Everything I’ve read said that’s not supposed to happen. They all say a notification will continue until the user opens the app and does something (whatever you need them to do).
(The behavior I want is a notification until the app is opened and I can’t seem to get it)
What’s going on?
Is this and iOS version-specific behavior?
you can schedule up to 64 local notifications.
There is no reason why you couldn’t schedule a notification every 5 seconds, using an increasing NSTimeInterval.
What you need to ensure though is that the application cancels all local notifcations yet to fire as soon as the app opens. Otherwise the remaining notifications you schedules would still be primed to fire.
In your above statement, I think you mis understand the close action. This does not act like a snooze button on the alarm. A local notification will only fire once, even when dismissed.
The only way around it is to schedule multiple, similiar, notifications as I mentioned above, or to adda repeat interval. Repeat intervals are not customisable though and may not fit your needs.