ostinelli / apnotic

A Ruby APNs HTTP/2 gem able to provide instant feedback.
MIT License
480 stars 96 forks source link

Support payload/request keys for iOS 16 live activities #124

Closed crafterm closed 1 year ago

crafterm commented 1 year ago

This PR adds support for push payload and request keys used when sending an update to an iOS 16 live activity, as per:

https://developer.apple.com/documentation/activitykit/updating-and-ending-your-live-activity-with-activitykit-push-notifications

ie:

and additionally a wrapper push_type for setting the apns-push-type request header with fallback to the existing background_notification? method when unset.

Updates to the README where required.

Confirmed working using my local project.

Thanks for your consideration - any changes or feedback require please let me know 🙏

benubois commented 1 year ago

Hi @crafterm,

This looks great, thank you!

The test failures are unrelated to your PR so I'm going to go ahead an merge this.

ostinelli commented 1 year ago

Thank you @crafterm and @benubois! Gonna push 1.7.1 soon (when we get back to green).

crafterm commented 1 year ago

Thanks team! 🙏