Today extensions should have access to local notifications
| Originator: | robotspacer | ||
| Number: | rdar://17938961 | Date Originated: | 06-Aug-2014 07:35 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 8.0 (12A4345d) |
| Classification: | Enhancement | Reproducible: | N/A |
Summary: As far as I can tell, a Today extension cannot access local notifications at all, since [UIApplication sharedApplication] is not available to the extension. I think this is a significant oversight. There are many good reasons I can think of to want this feature, but here's one of the best examples I can think of: I use an app to remind me when to take medications. I would really, really love to have a simple Today widget that shows my pills and lets me check them off after I've taken them. But there's no good way to do this. Even if the app was using background refresh, a local notification reminding me to take a pill might fire between the time I check it off in the Today widget and when the app next runs in the background. (And really, there's no good reason to have the app refreshing in the background anyway.) I assume this problem could be solved with push notifications, but then I'm telling a third party about all the medications I'm on AND relying on a good internet connection to receive an important reminder. So that's really not a good solution at all. Steps to Reproduce: 1. Create an app with a Today extension. 2. Use UIApplication's features for local notifications, like scheduleLocalNotification: 3. Attempt to cancel or add a notification from the Today extension. Expected Results: NCExtensionContext should offer some way to access these notifications through the following methods: scheduleLocalNotification: presentLocalNotificationNow: cancelLocalNotification: cancelAllLocalNotifications scheduledLocalNotifications Actual Results: As far as I can tell it's not possible to do anything with location notifications from an extension.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
+1 I don't know if access to local notifications is currently forbidden for any kind of security measure, but at least access could be granted somehow if the device is already unlocked or otherwise ask the user for permission to perform the action. This would greatly simplify the workflow for all this kind of applications.
+1 This is a show stopper. I'm building an app very similar to the one you are proposing, and the limit that today widget has dosn't make any sense.