APNSwift
APNSwift copied to clipboard
iOS 16.1 Live Activity support added
Thank you for this, you are a legend!
How would I use the Activity's push token in the request's header? As described in the documentation:
To use remote push notifications to update your Live Activities, you need to use push tokens for authenticating with APNs as described in Establishing a Token-Based Connection to APNs.
When you’ve successfully started your Live Activity, you receive an Activity with a pushToken. Send it to your push notification server, and use it to send remote push notifications that update or end the Live Activity.
Send push notifications to the Live Activity using the push token you stored on your server. It’s essential that you set the fields for the content-state key to match your custom Activity.ContentState type to ensure the system can decode the JSON payload and update the Live Activity.
The deviceToken param will contain Activity pushToken. There is no need to send it separately. So we'll be sending push notification using Activity pushToken and deviceToken won't be required in this case. I should have updated param name to reflect this.
Awesome, that helps a lot! Thanks again dude
@nasircsms planning on making these changes or should I take over?
closing in favor of #164