Contents

activityUpdatedForAlert(_:)

Provides an updated Live Activity and requests confirmation that the accessory displayed an alert.

Declaration

func activityUpdatedForAlert(_ activity: AccessoryLiveActivity) -> Bool

Parameters

  • activity:

    An updated Live Activity that includes alert content.

Mentioned in

Return Value

true if the accessory successfully displayed an alert for this update, false otherwise.

Overview

Use this callback method to keep the accessory’s display in sync with the current state of the Live Activity, display an included alert, and coordinate alerts across devices. 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.

See Also

Receiving Live Activity updates