One Logo Pool Ball
AlarmKit · IOS API REFERENCE

Alarm.CountdownDuration

struct · iOS 26.0+ · SDK 27.1

struct CountdownDuration

An object that defines the durations used in an alarm that has a countdown. Provide the countdown duration in seconds. ``` swift Alarm.CountdownDuration(preAlert: 10, postAlert: 10) ```

Members (5)

init · iOS 26.0+

init

TypeScript
static init(preAlert?: (number) | null, postAlert?: (number) | null): Alarm_CountdownDuration
Swift declaration
init(preAlert: TimeInterval?, postAlert: TimeInterval?)

Creates an instance of a countdown duration. - Parameters: - preAlert: The duration applied before the alarm fires. - postAlert: The duration applied after the alarm has alerted at least once and moves back to the countdown state.

get · iOS 26.0+

preAlert

TypeScript
get preAlert(): (number) | null
Swift declaration
var preAlert: TimeInterval?

The duration applied before the alarm fires. For example, this would be the duration of a timer.

set · iOS 26.0+

preAlert

TypeScript
set preAlert(value: (number) | null)
Swift declaration
var preAlert: TimeInterval?

The duration applied before the alarm fires. For example, this would be the duration of a timer.

get · iOS 26.0+

postAlert

TypeScript
get postAlert(): (number) | null
Swift declaration
var postAlert: TimeInterval?

The duration applied after the alarm has alerted at least once and moves back to the countdown state. For example, this would be the snooze duration for an alarm. A timer with a repeat button could set this value to be the same as `preAlert`, or it could leave the value as `nil`. If the value is `nil` we will use the `preAlert` duration for post-alarm countdowns.

set · iOS 26.0+

postAlert

TypeScript
set postAlert(value: (number) | null)
Swift declaration
var postAlert: TimeInterval?

The duration applied after the alarm has alerted at least once and moves back to the countdown state. For example, this would be the snooze duration for an alarm. A timer with a repeat button could set this value to be the same as `preAlert`, or it could leave the value as `nil`. If the value is `nil` we will use the `preAlert` duration for post-alarm countdowns.

Skipped declarations

No declarations were skipped in this snapshot.

All AlarmKit types →