iOS 13 requires new headers to the APNS - Ruby houston

Hey all! The new iOS 13 requires some new headers in the APNS so the pushes will work apns-push-type & apns-priority Otherwise the pushes won't work for iOS 13 + os

Asked Oct 12 '21 10:10
avatar RebMeir
RebMeir

4 Answer:

hm i have an issue for this already #168 and a PR albeit broken

1
Answered Sep 25 '19 at 17:56
avatar  of ab320012
ab320012

It looks like Houston currently uses the legacy, binary notification format instead of the HTTP/2 api. Apple so far has not provided any documentation on how to supply this parameter with the legacy notification, or if one is even required. Has someone been able to test that pushes through Houston are actually rejected from an iOS 13 device, or are we just going off of possibly inaccurate documentation?

1
Answered Sep 30 '19 at 15:41
avatar  of nightpool
nightpool

I can confirm rejections from iOS 13 devices. Houston reports a successful send, but the push notification never reaches the device.

1
Answered Oct 15 '19 at 17:31
avatar  of monochrome-particles
monochrome-particles

If you noticed that some messages are not getting received by the device, check your payload. Chances are, the payload does not include an alert parameter -- probably because you meant to send it as a 'background' message, like updating the badge, or signalling.

A workaround for this is to send a payload with some alert text (try an empty string), and the message will be received by the iOS 13 device.

Example:

notification = Houston::Notification.new(device: token)
notification.alert = ''
notification.badge = 2
notification.category = 'SOME_CATEGORY'
notification.content_available = true

APN.push(notification)
1
Answered Oct 15 '19 at 18:15
avatar  of monochrome-particles
monochrome-particles