diff --git a/website/docs/getting-started/introduction.md b/website/docs/getting-started/introduction.md index 5dddf46..c9fe60f 100644 --- a/website/docs/getting-started/introduction.md +++ b/website/docs/getting-started/introduction.md @@ -26,7 +26,9 @@ const activityUI = ( Driver en route Building A · Lobby pickup - + + Contact driver + ) diff --git a/website/docs/ios/components/overview.md b/website/docs/ios/components/overview.md index 733921a..7a0c954 100644 --- a/website/docs/ios/components/overview.md +++ b/website/docs/ios/components/overview.md @@ -14,7 +14,9 @@ const MyComponent = () => { return ( Hello Live Activity! - + + Tap me + ) } diff --git a/website/docs/ios/development/developing-live-activities.md b/website/docs/ios/development/developing-live-activities.md index 66a275e..e94b5e7 100644 --- a/website/docs/ios/development/developing-live-activities.md +++ b/website/docs/ios/development/developing-live-activities.md @@ -153,7 +153,9 @@ function MyComponent() { Test Live Activity This is how it will look - + + Test Button + ) diff --git a/website/docs/ios/development/interactions.md b/website/docs/ios/development/interactions.md index dd796e3..9cf0abe 100644 --- a/website/docs/ios/development/interactions.md +++ b/website/docs/ios/development/interactions.md @@ -55,7 +55,9 @@ Each interaction event contains: To receive interaction events, make sure your interactive components have unique identifiers: ```typescript - + + Contact driver + ``` @@ -140,8 +142,12 @@ function MyLiveActivity() { lockScreen: ( Music Player - - + + Play + + + Pause + ), diff --git a/website/docs/ios/development/server-side-updates.md b/website/docs/ios/development/server-side-updates.md index 142f6d6..ed81094 100644 --- a/website/docs/ios/development/server-side-updates.md +++ b/website/docs/ios/development/server-side-updates.md @@ -93,6 +93,8 @@ The `renderLiveActivityToString` function accepts a `LiveActivityVariants` objec When sending push notifications to update Live Activities, you need to structure your APNS payload correctly. For detailed information about APNS payload structure, see Apple's [official ActivityKit push notification documentation](https://developer.apple.com/documentation/activitykit/starting-and-updating-live-activities-with-activitykit-push-notifications). +You can also use Apple’s [CloudKit - Push Notifications tool](https://icloud.developer.apple.com/dashboard/notifications/) to send test push notifications during development. + ### Required APNS headers ``` @@ -132,7 +134,11 @@ Replace `` with your app's bundle identifier (e.g., `com.exa "name": "some-name", "deepLinkUrl": "app://some-deep-link-url" }, - "timestamp": 1764145755 + "timestamp": 1764145755, + "alert": { + "title": "Driver arrived", + "body": "Ready for pickup" + } } } ``` @@ -140,10 +146,11 @@ Replace `` with your app's bundle identifier (e.g., `com.exa **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 +- `aps.content-state.uiJsonData`: The JSON string returned by `renderLiveActivityToString`, embedded as a string value eg. `ixOAeyJ2IjoxLCJscyI6eyJ0IjowLCJjIjoiSGVsbG8sIHdvcmxkISJ9fQM=` - `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 :::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. diff --git a/website/docs/ios/introduction.md b/website/docs/ios/introduction.md index fdb4c7c..2bf2eee 100644 --- a/website/docs/ios/introduction.md +++ b/website/docs/ios/introduction.md @@ -17,7 +17,9 @@ const activityUI = ( Driver en route Building A · Lobby pickup - + + Contact driver + )