
Alarmkit
Ship iOS 26+ wake alarms and countdown timers with Lock Screen, Dynamic Island, and Watch system UI via AlarmManager and AlarmAttributes.
Install
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill alarmkitWhat is this skill?
- End-to-end AlarmKit workflow: authorization, scheduling, countdown timers, snooze, and state observation
- AlarmAttributes and AlarmPresentation configure system templates instead of custom widget views
- Lock Screen, Dynamic Island, and Apple Watch surfaces with Focus/Silent override behavior documented
- Alarm vs timer decision guide and AlarmButton stop/snooze actions
- Requires iOS 26+ / iPadOS 26+; references alarmkit-patterns.md for full Swift samples
Adoption & trust: 1.7k installs on skills.sh; 713 GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Vercel React Native Skillsvercel-labs/agent-skills
Firebase Basicsfirebase/agent-skills
Building Native Uiexpo/skills
Firebase Ai Logic Basicsfirebase/agent-skills
Native Data Fetchingexpo/skills
Firebase Firestorefirebase/agent-skills
Journey fit
Primary fit
Build is where native AlarmKit integration happens; the skill targets feature implementation before App Store launch workflows. Frontend covers system-managed Live Activity presentation, AlarmPresentation, and AlarmButton UX rather than server infrastructure.
Common Questions / FAQ
Is Alarmkit safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Alarmkit
# AlarmKit Schedule prominent alarms and countdown timers that surface on the Lock Screen, Dynamic Island, and Apple Watch. AlarmKit requires iOS 26+ / iPadOS 26+. Alarms override Focus and Silent mode automatically. AlarmKit builds on Live Activities -- every alarm creates a system-managed Live Activity with templated UI. You configure the presentation via `AlarmAttributes` and `AlarmPresentation` rather than building custom widget views. See [references/alarmkit-patterns.md](references/alarmkit-patterns.md) for complete code patterns including authorization, scheduling, countdown timers, snooze handling, and widget setup. ```swift import AlarmKit ``` ## Contents - [Workflow](#workflow) - [Authorization](#authorization) - [Alarm vs Timer Decision](#alarm-vs-timer-decision) - [Scheduling Alarms](#scheduling-alarms) - [Countdown Timers](#countdown-timers) - [Alarm States](#alarm-states) - [AlarmAttributes and AlarmPresentation](#alarmattributes-and-alarmpresentation) - [AlarmButton](#alarmbutton) - [Live Activity Integration](#live-activity-integration) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Workflow ### 1. Create a new alarm or timer 1. Add `NSAlarmKitUsageDescription` to Info.plist with a user-facing string. 2. Request authorization with `AlarmManager.shared.requestAuthorization()`. 3. Configure `AlarmPresentation` (alert, countdown, paused states). 4. Create `AlarmAttributes` with the presentation, optional metadata, and tint color. 5. Build an `AlarmManager.AlarmConfiguration` (.alarm or .timer). 6. Schedule with `AlarmManager.shared.schedule(id:configuration:)`. 7. Observe state changes via `alarmManager.alarmUpdates`. 8. If using countdown, add a widget extension target for non-alerting Live Activity UI. ### 2. Review existing alarm code Run through the Review Checklist at the end of this document. ## Authorization AlarmKit requires explicit user authorization. Without it, alarms silently fail to schedule. Request early (e.g., at onboarding) or let AlarmKit prompt automatically on first schedule. ```swift let manager = AlarmManager.shared // Request authorization explicitly let state = try await manager.requestAuthorization() guard state == .authorized else { return } // Check current state synchronously let current = manager.authorizationState // .authorized, .denied, .notDetermined // Observe authorization changes for await state in manager.authorizationUpdates { switch state { case .authorized: print("Alarms enabled") case .denied: print("Alarms disabled") case .notDetermined: break @unknown default: break } } ``` ## Alarm vs Timer Decision | Feature | Alarm (`.alarm`) | Timer (`.timer`) | |---|---|---| | Fires at | Specific time (schedule) | After duration elapses | | Countdown UI | Optional | Always shown | | Recurring | Yes (weekly days) | No | | Use case | Wake-up, scheduled reminders | Cooking, workout intervals | Use `.alarm(schedule:...)` when firing at a clock time. Use `.timer(duration:...)` when firing after a duration from now. ## Scheduling Alarms ### Alarm.Schedule Alarms use `Alarm.Schedule` to define when they fire. ```swift // Fixed: fire at an exact Date (one-time only) let fixed: Alarm.Schedule = .fixed(myDate) // Relative one-time: fire at 7:30 AM in device time zone, no repeat let oneTime: Alarm.Schedule = .relative(.init( time: .init(hour: 7, minute: 30), repeats: .never )) // Recurring: fire at 6:00 AM on weekdays let we