---
title: AlarmManager.AlarmConfiguration
framework: alarmkit
role: symbol
role_heading: Structure
path: alarmkit/alarmmanager/alarmconfiguration
---

# AlarmManager.AlarmConfiguration

An object that contains all the properties necessary to schedule an alarm.

## Declaration

```swift
struct AlarmConfiguration<Metadata> where Metadata : AlarmMetadata
```

## Overview

Overview 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))

## Topics

### Configuring a scheduled alarm

- [alarm(schedule:attributes:stopIntent:secondaryIntent:sound:)](alarmkit/alarmmanager/alarmconfiguration/alarm(schedule:attributes:stopintent:secondaryintent:sound:).md)

### Configuring a countdown

- [init(countdownDuration:schedule:attributes:stopIntent:secondaryIntent:sound:)](alarmkit/alarmmanager/alarmconfiguration/init(countdownduration:schedule:attributes:stopintent:secondaryintent:sound:).md)
- [timer(duration:attributes:stopIntent:secondaryIntent:sound:)](alarmkit/alarmmanager/alarmconfiguration/timer(duration:attributes:stopintent:secondaryintent:sound:).md)

### Initializers

- [init(countdownDuration:schedule:attributes:appEntityIdentifier:stopIntent:secondaryIntent:sound:)](alarmkit/alarmmanager/alarmconfiguration/init(countdownduration:schedule:attributes:appentityidentifier:stopintent:secondaryintent:sound:).md)

### Type Methods

- [alarm(schedule:attributes:appEntityIdentifier:stopIntent:secondaryIntent:sound:)](alarmkit/alarmmanager/alarmconfiguration/alarm(schedule:attributes:appentityidentifier:stopintent:secondaryintent:sound:).md)
- [timer(duration:attributes:appEntityIdentifier:stopIntent:secondaryIntent:sound:)](alarmkit/alarmmanager/alarmconfiguration/timer(duration:attributes:appentityidentifier:stopintent:secondaryintent:sound:).md)

## See Also

### Scheduling an alarm

- [schedule(id:configuration:)](alarmkit/alarmmanager/schedule(id:configuration:).md)
