问题
I'm currently deploying an app for iPhone and I was wondering if the app could receive a notification (while it is suspended in the background) when the alarm of the native clock rings so the app can be triggered to the foreground. If this is not possible is there any way to retrieve information about the shceduled time and date of the native alarm clock. I have been searching this on internet a lot but I couldn't find any answer on this question. Your help is appreciated!
回答1:
You get absolutely no access to the native clock, so that's not possible.
You might develop your own clock application and fire UILocalNotifiation's. When the user is currently doing some other stuff (not running your app), he get's the chance to slide and get to your app, where you can put your specific informations.
来源:https://stackoverflow.com/questions/11542048/native-alarm-clock-notification-on-ios