AlarmManager.AlarmConfiguration
An object that contains all the properties necessary to schedule an alarm.
Declaration
struct AlarmConfiguration<Metadata> where Metadata : AlarmMetadataOverview
Pass the schedule or countdown and any attributes you define to the AlarmConfiguration for the system to schedule. You can pass in an optional secondary intent that the system executes when a person taps a secondary button. This is only available after first unlock. You can also include custom sounds for your alarm.
The following example configures an alarm with a countdown duration.
let configuration = AlarmManager.AlarmConfiguration(
countdownDuration: Alarm.CountdownDuration(preAlert: 10, postAlert: 10),
schedule: nil,
attributes: attributes,
secondaryIntent: repeatIntent,
alertConfiguration: AlertConfiguration(
title: "Eggs are ready!",
body: "Time to eat!",
sound: .default))