Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions website/docs/ios/development/server-side-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,34 @@ Replace `<your.app.bundle.id>` with your app's bundle identifier (e.g., `com.exa
}
```

**For ending an existing Live Activity:**

```json
{
"aps": {
"timestamp": 1683012400,
"event": "end",
"content-state": {
"uiJsonData": "{\"lockScreen\":{\"type\":\"VStack\",\"children\":{\"type\":\"Text\",\"children\":\"Hello\",\"props\":{}},\"props\":{}}}"
},
"dismissal-date": 1683016000
}
}
```

**Key fields:**

- `aps.event`: Set to `"update"` for updating an existing Live Activity, or `"start"` for push-to-start (iOS 17.2+)
- `aps.content-state.uiJsonData`: The JSON string returned by `renderLiveActivityToString`, embedded as a string value eg. `ixOAeyJ2IjoxLCJscyI6eyJ0IjowLCJjIjoiSGVsbG8sIHdvcmxkISJ9fQM=`
- `aps.event`: Set to `"update"` to update, `"end"` to end, or `"start"` for push-to-start (iOS 17.2+)
- `aps.content-state.uiJsonData`: The JSON string returned by `renderLiveActivityToString`, embedded as a string value eg. `ixOAeyJ2IjoxLCJscyI6eyJ0IjowLCJjIjoiSGVsbG8sIHdvcmxkISJ9fQM=`. This must be sent for `update` and `end` events.
- `aps.timestamp`: Unix timestamp in seconds (required for Live Activities)
- `aps.attributes-type`: For push-to-start, must be `"VoltraAttributes"`
- `aps.attributes.name`: For push-to-start, a user-defined name for the activity (can be any string you choose)
- `aps.alert`: Required field for push-to-start

For `event: "end"`, include `aps.dismissal-date`. In practice, using the current timestamp is recommended when you want immediate dismissal (and can help avoid crashes seen in some integrations when delayed dismissal is used).

When sending `update` or `end` events, target the Live Activity **update token** for that activity. Do not use a push-to-start token for these events.

:::danger
ActivityKit enforces a strict payload size limit of approximately 4 KB. Keep your UI JSON minimal to stay within this limit. Avoid deeply nested component trees and excessive styling to ensure your payloads fit within the constraint.
:::
Expand Down
Loading