Set notifications from Today Extension Widget

匆匆过客 提交于 2019-12-10 17:07:43

问题


I am creating a simple timer app which will have a lot of focus on the today extension widget features. Users can start the timer from here by tapping.

The only problem is that I need to set a local notification from the widget. I have tried to use [[UIApplicaton sharedApplication] scheduleLocalNotification] but Xcode throws an error saying that shared application is unavailable in app extension. Is there any solution for setting a local notification from Today extension? Thanks in advance. Any help whatsoever is appreciated.

来源:https://stackoverflow.com/questions/25701838/set-notifications-from-today-extension-widget

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!