activityUpdated(_:)
Provides an updated Live Activity.
Declaration
func activityUpdated(_ activity: AccessoryLiveActivity)Parameters
- activity:
The updated Live Activity.
Mentioned in
Overview
Use this callback method to keep the accessory’s display in sync with the current state of the Live Activity. Parse the activity’s details, select the information to display on your accessory, and convert it to data for transmission. Then, send the data to your accessory using the Live Activity’s corresponding LiveActivityForwarding.Session and its LiveActivityForwarding/Session/send(message:) method.
If the activity’s state property equals ActivityState.dismissed, remove the Live Activity from the accessory’s display.