The system managed content state of an alarm Live Activity.
A Live Activity consists of two components: static attributes and dynamic content.
Using a sports game as an example, the static attributes represent the team names,
while the dynamic content represents the current score that updates throughout the game.
For alarms, these components serve distinct purposes:
- **Static attributes**: Your app provides this content through ``AlarmAttributes``,
including information such as tint color and button labels that remain constant.
- **Dynamic content**: AlarmKit provides this content through ``AlarmPresentationState``,
including system-managed information such as the alarm ``Mode/Countdown/fireDate`` and current presentation mode.
The system automatically updates the ``AlarmPresentationState`` as the alarm transitions
between different states, such as ``Alarm/State/countdown``, ``Alarm/State/alerting``, and ``Alarm/State/paused``.
Members (5)
get · iOS 26.0+
mode
TypeScript
get mode(): AlarmPresentationState_Mode
Swift declaration
var mode: AlarmPresentationState.Mode
The specific state of the alarm, either alerting, countdown, or paused.
Use `mode` to determine which mode the alarm is in, so that a
widget extension can produce the appropriate UI.
set · iOS 26.0+
mode
TypeScript
set mode(value: AlarmPresentationState_Mode)
Swift declaration
var mode: AlarmPresentationState.Mode
The specific state of the alarm, either alerting, countdown, or paused.
Use `mode` to determine which mode the alarm is in, so that a
widget extension can produce the appropriate UI.
Creates an instance of an alarm state.
- Parameters:
- alarmID: The unique ID of the alarm.
- mode: The mode the alarm is in such as alerting or countdown.