Notification service extensions should be able to suppress notifications
| Originator: | greg.cooksey | ||
| Number: | rdar://29044281 | Date Originated: | 2016-11-01 |
| Status: | Open | Resolved: | No |
| Product: | iOS SDK | Product Version: | 10.1 |
| Classification: | Enhancement | Reproducible: | N/A |
Summary: It would be nice if we were able to prevent a notification from displaying in our UNNotificationServiceExtension implementations. Currently, if I override the -didReceiveNotificationRequest:withContentHandler: method and pass nil to the contentHandler block, the original notification is displayed to the user. It would be useful if there was some parameter I could pass to the contentHandler that would prevent *any* notification from being displayed. Steps to Reproduce: 1. Create an app with a UNNotificationServiceExtension extension target 2. In the extension's override of -didReceiveNotificationRequest:withContentHandler: call the contentHandler and pass it nil for its argument 3. Send a push notification with the mutable-content field set to true Expected Results: No notification is displayed Actual Results: The original notification is displayed Version: iOS 10.1 (14B72)
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!