iOS上的本机闹钟通知

iOS上的本机闹钟通知

问题描述:

我目前正在为iPhone部署一个应用程序,我想知道当本机时钟的警报响起时,该应用程序是否可以收到通知(在后台挂起时),以便可以将应用程序触发到前台. 如果无法做到这一点,则有任何方法可以检索有关本机闹钟的缩短时间和日期的信息. 我已经在互联网上搜索了很多,但是找不到这个问题的答案. 感谢您的帮助!

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!

您绝对无法访问本机时钟,所以这是不可能的.

You get absolutely no access to the native clock, so that's not possible.

您可以开发自己的时钟应用程序并启动 UILocalNotifiation .当用户当前正在做其他事情(不运行您的应用程序)时,他就有机会滑动并转到您的应用程序,您可以在其中放置您的特定信息.

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.