An object that exposes functions to work with alarms: scheduling, snoozing, cancelling.
Schedule your alarm alert using `AlarmManager`. The following example calls the `AlarmManager` schedule function by passing in the id and configuration.
``` swift
Task {
let _ = try? await AlarmManager.shared.schedule(id: id, configuration: configuration)
}
```
Members (11)
get · iOS 26.0+
alarmUpdates
TypeScript
get alarmUpdates(): SDKHandle
Swift declaration
var alarmUpdates: some AsyncSequence<Array<Alarm>, Never> { get }
An asynchronous sequence that emits events when the set of alarms changes.
Use this to receive a notification when an alarm alerts, snoozes, or dismisses.
get · iOS 26.0+
authorizationState
TypeScript
get authorizationState(): AlarmManager_AuthorizationState
Swift declaration
var authorizationState: AlarmManager.AuthorizationState { get }
Returns the current authorization state for this client.
get · iOS 26.0+
authorizationUpdates
TypeScript
get authorizationUpdates(): SDKHandle
Swift declaration
var authorizationUpdates: some AsyncSequence<AlarmManager.AuthorizationState, Never> { get }
An asynchronous sequence that emits events when authorization to use
alarms changes.
Requests permission to use the alarm system if it hasn't been requested before.
If a person using your app denies authorization, all attempts to schedule alarms fail.
method · iOS 26.0+
stop
TypeScript
stop(id: string): void
Swift declaration
func stop(id: Alarm.ID) throws
Stops the alarm with the specified ID.
If the alarm is a one-shot, meaning
it doesn't have a repeating schedule, then the system deletes the alarm.
If the alarm repeats then it's rescheduled to alert or begins
counting down at the next scheduled time.
- Parameter id: The identifier of the alarm to stop.
method · iOS 26.0+
pause
TypeScript
pause(id: string): void
Swift declaration
func pause(id: Alarm.ID) throws
Pauses the alarm with the specified ID if it's in the countdown
state.
The function throws otherwise. Sets the alarm to the ``AlarmPresentationState/Mode/paused(_:)`` state.
- Parameter id: The identifier of the alarm to pause.
get · iOS 26.0+
alarms
TypeScript
get alarms(): Array<Alarm>
Swift declaration
var alarms: [Alarm] { get throws }
Fetches all alarms from the daemon that belong to the current client.
As soon as an alarm fires and stops it's
deleted from the daemon's store. If you want to determine if a
one-shot alarm has fired, persist your alarms in your
own store and compare that with the result of this function call. If
the array is missing scheduled alarms, then those alarms fired.
method · iOS 26.0+
cancel
TypeScript
cancel(id: string): void
Swift declaration
func cancel(id: Alarm.ID) throws
Cancels the alarm with the specified ID.
Deletes the
alarm from the system even if the alarm has a repeating schedule.
- Parameter id: The identifier of the alarm to cancel.
method · iOS 26.0+
resume
TypeScript
resume(id: string): void
Swift declaration
func resume(id: Alarm.ID) throws
Resumes the alarm with the specified ID if it's in the paused state.
The function throws otherwise. Sets the alarm to the ``AlarmPresentationState/Mode/Countdown`` state.
- Parameter id: The identifier of the alarm to resume.
get · iOS 26.0+
shared
TypeScript
static get shared(): AlarmManager
Swift declaration
static let shared: AlarmManager
The singleton instance for interacting with the alarm system.
method · iOS 26.0+
countdown
TypeScript
countdown(id: string): void
Swift declaration
func countdown(id: Alarm.ID) throws
Performs a countdown for the alarm with the specified ID if it's currently alerting.
The function throws otherwise.
This is identical to the repeat function of a timer, or
the snooze function of an alarm.
- Parameter id: The identifier of the alarm to perform a countdown for.
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
AlarmManager.schedule(id:configuration:)
This declaration needs Swift generic type arguments. (no canonical witness for Metadata)