Allow UNNotificationServiceExtension to filter delivery of push notification
| Originator: | kevin | ||
| Number: | rdar://27651524 | Date Originated: | 1-Aug-2016 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | Xcode Version 8.0 beta 3 (8S174q) |
| Classification: | Enhancement | Reproducible: | Always |
Summary: In order to provide our users with a finer granularity over the types of notifications they received, we would like to filter push notifications based on device based settings. Based on these settings, we would filter the incoming push notifications within the UNNotificationServiceExtension.didReceive(_:withContentHandler:) method. Ideally, we would be able to invoke the contentHandler with nil, or a specially defined instance signifying no alert should be shown. Steps to Reproduce: N/A Expected Results: The current UNNotificationServiceExtension method is defined as: func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: (UNNotificationContent) -> Void) the proposed definition might be: func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: (UNNotificationContent?) -> Void) Actual Results: N/A Version: Xcode 8 beta 3 (8S174q) Notes: Configuration: iPhone SE Attachments:
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!