diff --git a/client.go b/client.go index c389bd74..46d38d14 100644 --- a/client.go +++ b/client.go @@ -205,6 +205,7 @@ func (c *Client) PushWithContext(ctx Context, n *Notification) (*Response, error r := &Response{} r.StatusCode = response.StatusCode r.ApnsID = response.Header.Get("apns-id") + r.ApnsUpdateToken = response.Header.Get("apns-update-token") decoder := json.NewDecoder(response.Body) if err := decoder.Decode(r); err != nil && err != io.EOF { diff --git a/response.go b/response.go index 99d63456..dd5f13e9 100644 --- a/response.go +++ b/response.go @@ -132,6 +132,11 @@ type Response struct { // If the value of StatusCode is 410, this is the last time at which APNs // confirmed that the device token was no longer valid for the topic. Timestamp Time + + // ApnsUpdateToken is returned by APNs when the notification payload contains + // "input-push-token": 1. It can be used to send subsequent Live Activity + // update pushes without waiting for the app to register the token. + ApnsUpdateToken string } // Sent returns whether or not the notification was successfully sent.