Perfect-Notifications
Perfect-Notifications copied to clipboard
Adopt APNs changes with iOS 13
Adds the apns-push-type option to NotificationPusher, as required for watchOS 6 and recommended for all other platforms.
The initialization of NotificationPusher receives an additional, optional argument of type APNSPushType, which is an enum specifying the type of the notification.
Specifying the type adds the apns-push-type key with the appropriate value to the header of the notification request.
The APNSPushType enum is commented with additional information about the different types, as detailed in Sending Notification Requests to APNs.
Adding the option resolves issues with push notifications being dropped when no alert is included, specifically when sending content-available push updates.