How to get new push token for Live Activity using input-push-token option

The documentation doesn't state how to get the new APNs push token that is associated with a Live Activity that is started via an APNs push notification. I have been able to get the new token by listening to all instances of the Live Activities for my attribute type, but it makes me wonder how the "input-push-token" option for iOS 18 is supposed to work.

Is there another way to retrieve the newly created Live Activity push token when using "input-push-token"?

The new token will delivered to you by calling code in your Live Activity process in the appropriate callback. You don't actually retrieve it, nor can it be requested on demand. Usually the start and update are the same initially so you can test both components without needed to be woken up. Essentially your callback code will be called whenever a new token is delivered. At that time your code should send that token to your server or wherever you store it for use with APNs.

Rico

WWDR - DTS - Software Engineer

How to get new push token for Live Activity using input-push-token option
 
 
Q