Reputation: 36078
Is there a way to access and update the native alarm settings in the iPhone from my app? I need to have a sliding alarm that changes based on the time of year and I want to use the native iPhone alarm for that. Is this possible in the iOS SDK, maybe asking the user for access to the alarm like when your app needs access to the camera or photos for example?
Upvotes: 3
Views: 2174
Reputation: 806
Unfortunately, I believe there is no public API for accessing the Clock app and settings. I think the reason for this is that Apple wants to restrict Clock's unique background behavior to its native app.
An alternative would be to use UILocalNotifications
to set off the alarm.
From the Apple Docs,
Local notifications are ideally suited for apps with time-based behaviors, such as calendar and to-do list apps. Apps that run in the background for the limited period allowed by iOS might also find local notifications useful.
Upvotes: 1