Skip to content

Conversation

guruslan
Copy link

@guruslan guruslan commented Mar 18, 2025

#729

To make it work requires the following:

  • if you want to start it from server:
    • obtain pushToStart token from mobile device.
    • send an event with msg.live_activity = { 'event' => 'start', 'attributes-type' => ..., 'attributes' => ... } and token = pushToStartToken (not your regular apns token).
    • mobile device obtains pushToken and sends to server.
    • send update events with msg.live_activity = { 'event' => 'update', 'content-state' => ... } and token=pushToken.
    • in iOS 18 there is some improved flow for this which I haven't tested and it might require bigger surgery to rpush.
  • if you want to start from the app:
    • app starts it, sends pushToken to server.
    • send update/end events same as above.

official docs: https://developer.apple.com/documentation/activitykit/starting-and-updating-live-activities-with-activitykit-push-notifications

@guruslan
Copy link
Author

could figure out how to run tests and add some if looks reasonable.

@benlangfeld
Copy link
Collaborator

@guruslan Thanks. This would need tests, docs and a changelog entry to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants