Skip to content

Commit 7d0d404

Browse files
committed
Add push to start live activity documentation
1 parent 279161e commit 7d0d404

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

MIGRATION_GUIDE_v3_to_v5.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,10 @@ The Live Activities namespace is accessible via `OneSignal.LiveActivities` and p
262262
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
263263
| `Task<bool> EnterAsync(string activityId, string token)` | ***Note:*** *This method is for iOS only<br>Entering a Live Activity associates an activityId with a live activity temporary push token on OneSignal's server. The activityId is then used with the OneSignal REST API to update one or multiple Live Activities at one time.* |
264264
| `Task<bool> ExitAsync(string activityId)` | ***Note:*** *This method is for iOS only<br>Exiting a Live activity deletes the association between a customer defined activityId with a Live Activity temporary push token on OneSignal's server.* |
265+
| `void SetupDefault(LiveActivitySetupOptions options = null)` | ***Note:*** *This method is for iOS only<br>Enable the OneSignalSDK to setup the default`DefaultLiveActivityAttributes` structure, which conforms to the `OneSignalLiveActivityAttributes`. When using this function, the widget attributes are owned by the OneSignal SDK, which will allow the SDK to handle the entire lifecycle of the live activity. All that is needed from an app-perspective is to create a Live Activity widget in a widget extension, with a `ActivityConfiguration` for `DefaultLiveActivityAttributes`. This is most useful for users that (1) only have one Live Activity widget and (2) are using a cross-platform framework and do not want to create the cross-platform <-> iOS native bindings to manage ActivityKit.* |
266+
| `void StartDefault(string activityId, IDictionary<string, object> attributes, IDictionary<string, object> content)` | ***Note:*** *This method is for iOS only<br>Start a new LiveActivity that is modelled by the default `DefaultLiveActivityAttributes` structure. The `DefaultLiveActivityAttributes` is initialized with the dynamic `attributes` and `content` passed in.* |
267+
| `void SetPushToStartToken(string activityType, string token)` | ***Note:*** *This method is for iOS only<br>Indicate this device is capable of receiving pushToStart live activities for the `activityType`. The `activityType` **must** be the name of the struct conforming to `ActivityAttributes` that will be used to start the live activity.* |
268+
| `void RemovePushToStartToken(string activityType)` | ***Note:*** *This method is for iOS only<br>Indicate this device is no longer capable of receiving pushToStart live activities for the `activityType`. The `activityType` **must** be the name of the struct conforming to `ActivityAttributes` that will be used to start the live activity.* |
265269

266270

267271
### Debug Namespace

0 commit comments

Comments
 (0)