PerfectlySoft / Perfect-Notifications

Apple Push Notifications (APNs) Server-Side library.
https://www.perfect.org
Apache License 2.0
115 stars 30 forks source link

Adopt iOS 13 APNS changes #14

Open nick3389 opened 4 years ago

nick3389 commented 4 years ago

Hello,

Will there be a release which adopts the changes that Apple introduced in APNS for iOS 13+ and watch OS 6+?? I talk about the apns-push-type and apns-priority requirements.

Thanx!

christophhagen commented 4 years ago

I've created a pull request #17 to resolve this issue. It solves my problem of sending background notifications without any alert keys.

My forked repository contains a release 4.1.0 with these changes, if you need to urgently support for this, consider temporarily switching to:

.package(url: "https://github.com/christophhagen/Perfect-Notifications.git", from: "4.0.0")

The initialization of NotificationPusher receives an additional argument pushType: which specifies the type of the notification, e.g.:

NotificationPusher(apnsTopic: topic, priority: .background, pushType: .background)

Please consider the additional requirements detailed in Sending Notification Requests to APNs.