Set notifications from Today Extension Widget

2019-06-28 03:51发布

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.

0条回答
登录 后发表回答