Closed bzanchet closed 7 years ago
Does this solve it for you? https://github.com/ostinelli/apnotic/pull/54
hi @ostinelli
yes, it does, thanks. Although I still prefer my (way) simpler solution :D
We're using my fork in production for a few months now without hiccups. I'll try and adopt the new official version and let you know how it goes, but shouldn't be a problem. It's essentially the same thing, but handling mdm
as a first-class citizen other than an after thought.
Feel free to discard this PR!
great, thank you.
Hey there,
we're working on a MDM (mobile device management) solution for iOS devices and
apnotic
seems like the best gem for sending push notifications over http2 right now.There was a small issue, though - MDM push notifications are of a special kind; Apple explicitly states that there shouldn't be a
aps
key within the push notification body (https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/MobileDeviceManagementProtocolRef/3-MDM_Protocol/MDM_Protocol.html#//apple_ref/doc/uid/TP40017387-CH3-SW3).As luck would have it, it was easy enough to patch the library so that it doesn't send the
aps
key if it's empty. I'm not entirely familiar with regular push notifications - I was hoping this change doesn't break any existing behavior (in other words: are push notifications with an emptyaps
even valid?).Anyways. Please let me know what you think.
Best! Bruno