Live Activity - ActivityState - case .dismissed

Hi everyone,

I'm working with Live Activities using the ActivityKit(Activity<Attributes>), and I'm trying to find a way to detect when a user manually dismisses a Live Activity by swiping it away — either from the Lock Screen or the Dynamic Island.

Currently, when a Live Activity ends, the activityState changes to .dismissed, which is defined as:

/// The Live Activity ended and is no longer visible because a person or the system removed it.
case dismissed

This doesn’t allow me to determine whether the dismissal was triggered by the user or by the system.

Is there any way — either through ActivityState, notifications, or another approach — to distinguish if a Live Activity was manually dismissed by the user vs. ended by the system?

Thanks in advance!

Live Activity - ActivityState - case .dismissed
 
 
Q