Post

Replies

Boosts

Views

Activity

Reply to How to start live activity by Push APNs?
pushToStartTokenUpdates is available as a static property for a given ActivityAttributes type. Assuming you have defined your attributes implementation, you can call Activity<YourAttributesType>.pushToStartTokenUpdates. This is different from how pushTokenUpdates is accessed since that property is tied to a specific instance of your Live Activity.
Dec ’23
Reply to Issue starting Live Activities with ActivityKit push notifications
From my experience, it seems that pushToStartTokenUpdates, and similarly pushToStartToken, will only trigger on a fresh app install + having rebooted your device + calling this method in didFinishLaunchingWithOptions, and it has to be that specific combination all at once. That means: Uninstalling and reinstalling the app will not trigger this token again. Simply restarting your device without reinstalling the app will also not trigger this token. If you call this stream in didFinishLaunchingWithOptions, you'll never get the token again unless steps 1 & 2 are also taken first. This doesn't seem like ideal behavior, as there may be a situation where my application may not be ready to process that push-to-start token. Basically, if my user misses that window to retrieve and process the token, they'll basically never be able to receive a Live Activity. I imagine this is a bug and hopefully gets resolved sooner rather than later.
Feb ’24