AndrewBarba / apns2

Node client for connecting to Apple's Push Notification Service using the new HTTP/2 protocol with JSON web tokens
MIT License
118 stars 32 forks source link

Support VoIP push by using correct apns-push-type #23

Closed bfelbo closed 4 years ago

bfelbo commented 4 years ago

We're getting 400 - InvalidPushType for our VoIP push because the apns-push-type is not set to voip as it should. See: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns

The simplest way to implement this is likely to detect whether it's a voip push from the topic. If it ends with .voip, it's a VoIP push and the push type should be set accordingly.

AndrewBarba commented 4 years ago

https://github.com/AndrewBarba/apns2/commit/9ad289adef910ca6d7d8a43c1e92edff3ca0e0aa