Setting an iPhone alarm in code?
Is it possible to set an alarm & alarm description for the iPhone's alarm clock application WITHIN my application code? So for example, set a 7:00am alarm with a description 'make coffee" in code. So开发者_开发问答 when the user exits my program, if they enter iPhones clock application it will have a 7am alarm set?, any responses will be greatly appreciated. thank you
Nope—your application is sandboxed by the system and cannot access or modify other apps’ data. You can create your own scheduled notifications, however, using the UILocalNotification
class; if you Google that, you’ll find plenty of examples of how to create alarm-like alerts that way.
Shouldn't Event Kit
serve your purpose?
精彩评论