noodlewerk / NWPusher

OS X and iOS application and framework to play with the Apple Push Notification service (APNs)
BSD 2-Clause "Simplified" License
6.3k stars 679 forks source link

Add support for iOS 10 HTTP/2 apns-collapse-id header #34

Open rusik opened 7 years ago

rusik commented 7 years ago

APNS now provides a new header apns-collapse-id to support notifications collapsing on iOS 10. Could you support this feature?

leovandriel commented 7 years ago

Hi, there will probably not be any support for this in the near future. The apns-collapse-id header is part of the newer HTTP/2.0 Provider API. This API is not available in Pusher, which uses the Binary Provider API. There are currently no plans to switch to HTTP/2.0.

apelican commented 7 years ago

That's a real bummer. The HTTP/2 API offers a ton of technical enhancements that improve reliability in high-volume situations, as well as the new Auth Key mechanism (which obviates the need for certificates!). I've removed NWPusher from my product because of this decision.

dourgulf commented 7 years ago

Is there any open source tools support HTTP/2 API ? @apelican

apelican commented 7 years ago

Sorry for the delay here -- yes, I found an MIT project that I was able to utilize HTTP/2 and JWT with: https://github.com/matthijs2704/vapor-apns

This won't be a great solution for everyone, but for my requirements this passed the test. No longer have to shake arrays of failed pushes :)

eliburke commented 7 years ago

In case anyone needs it, here's a CURL script to send HTTP/2 pushes https://gist.github.com/xuwei-k/2b0001964555bedf562e03b083b0e936

You will need your push cert+key in a PEM file, as well as a token and the bundle ID.