I downloaded some Alarm Clock apps from the App Store and found they are able to keep playing a sound and even vibrating the phone for more than 30 seconds (Limitations from UILocalNotifications) I even forced to close the application and it still work!
I wonder how is this possible? Is there another method than UILocalNotification ? Are they using several notifications?
Thanks!
I believe that if you schedule a UILocalNotification, the OS takes control of the notification and will execute it even when the application that scheduled it closes.
They could be using Push Notifications, but that would require an external server, internet, and is unlikely.
What is more likely is that they are just using UILocalNotifications. When you schedule one to go off at a specific time, it will go off at that time even if the app has been quit. The OS will direct all Local Notifications once they have been scheduled. Here's the Apple documentation on UILocalNotification.
EDIT: In response to your comment, scheduling one Local Notification, followed by scheduling a second one for 30 seconds later, and so on, is plausible. And to me, it seems like the only way if there is a 30 second restriction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With