10

I have searched for references to this and have found a few teasers, but nothing comprehensive.

I'm looking for a way to set up (and, perhaps delete, although not absolutely necessary) a new alarm in the actual IOS Alarm Clock application from a new (self-created) app.

Basically, the app I'm creating would programmatically add a new alarm (setting the time, and including choosing a ring tone) to the Clock app, which would then simply behave as it normally does -- making the built-in alarm clock ring when the time arrives.

Can anyone point specifically to the APIs that would help achieve this?

I did find reference to the CFPreferences APIs, and these seemed to imply being able to set Preferences for other apps. This sounds close, but clearly I'd need some more information, specifically:

1) The bundle / application ID for the Clock application 2) The format and specifics for adding (or removing) a new alarm using that preference setting

Does anyone have any wisdom to offer?

Many thanks, Scott Hurd

Scott Hurd
  • 101
  • 1
  • 3

1 Answers1

7

This behavior is not possible, sorry. You may set alarms with custom tones through your application and handle them through your application, these are called local notifications but it would not be possible to add an alarm to the ios alarm clock.

Kris Gellci
  • 8,943
  • 5
  • 35
  • 47
  • Ok, thanks for that. The built-in Clock Application has some very helpful properties -- the alarms ring persistently regardless of whether the phone is set to "silent" mode, or whether the volume controls are all the way down. This is the behaviour I actually want. I'd like to be able to detect a particular event (like the arrival of an EMAIL from a given address, or an SMS from a particular number) and then create an alarm. But I want the alarm to be persistent and work regardless of the setting of the "silent" switch or the system volume. Thanks for helping narrow the search field! – Scott Hurd Dec 03 '12 at 07:03
  • You actually can't detect if an SMS has been sent to the users phone or if an email is sent to an account that they set up on their phone. You don't have access to any events like that unless your application is some sort of email client/SMS client that receives push notifications when mail has been received on some server system that you have set up. – Kris Gellci Dec 03 '12 at 13:24