ENGINEERING NOTES

An alarm that won’t stop until you finish a mission, built on AlarmKit.

AlarmKit gives iPhone apps a real system alarm on iOS 26, designed for alarms you can stop. This is how Wakr fits an alarm that must keep ringing until a verified mission, and three behaviours that surprised us.

Wakr is an iPhone alarm with no snooze and no stop button. It keeps ringing until the phone confirms you did something, such as walking 100 steps or brushing your teeth. Before iOS 26, a third-party app could only imitate an alarm. AlarmKit made it a real one: it rings from a locked screen, through Silent Mode and Focus, with the app not running. It also came with a Stop button that Wakr cannot let mean stop.

Wakr is a Flutter app, but nearly everything below happens in Swift, and most of it applies to any app whose alarm has to wait for something.

Before AlarmKit: keeping an app alive

On iOS 15.5 through 18, Wakr uses the open-source alarm plugin for Flutter. While any alarm is scheduled, the plugin keeps the app running in the background by looping a silent audio file at 1% volume, mixed with other audio. A timer on the main run loop fires at alarm time, posts a time-sensitive notification, and starts the real tone in an audio session that plays through the silent switch. A background refresh task re-arms the timers when iOS allows it.

It works, with one hole nobody can patch: swipe the app away in the app switcher and the process, the timer, and the alarm are gone. The plugin can only post a warning afterwards. Wakr tells people about that risk inside the app on older iOS versions rather than hiding it.

The Android build, still in development, had a different problem. The plugin’s notification wired dismissing the notification straight to stopping the alarm, the exact shortcut Wakr exists to remove. Wakr ships a project-local fork in which dismissing the notification opens the mission instead, the notification does not cancel itself, and no stop action is added.

The AlarmKit setup

On iOS 26 and later, each Wakr alarm is an AlarmKit alarm whose alert has two buttons: the required stop button and a secondary button with custom behaviour. Both run the same App Intent, a LiveActivityIntent with openAppWhenRun set, which brings Wakr forward into the mission.

The intent never silences anything. Its perform() only records which alarm fired, and whether Wakr has to take over the audio, in the app’s own UserDefaults. Because openAppWhenRun runs the intent in the app’s process, those values are waiting when Flutter starts, even from a cold launch.

The one place that really stops an alarm is the mission screen, after the last mission passes. It asks AlarmManager to stop that alarm, and only then stops Wakr’s own tone. If the stop throws, the screen says it could not confirm the alarm was dismissed and the tone resumes. There is no timeout, no maximum ring time, and no exit button during a real alarm. When the camera cannot verify anything, the fallback is another mission, shaking the phone, not a way out.

Surprise one: Stop means stop

The first version had a single button, labelled Turn off alarm, whose intent opened Wakr. On a real morning the phone went quiet before the mission had started. AlarmKit silences the alert when the stop button runs, before the app gets control, and no intent can undo that.

The fix is the secondary button. With secondaryButtonBehavior set to .custom, it runs its intent and leaves the system alarm ringing, so a locked phone stays loud while you unlock it and Wakr opens. Both buttons now carry the same label and icon, Start Mission. The stop button cannot be removed, so its intent passes a flag instead: when it was used, Wakr starts its own looping tone the moment the mission screen appears.

On an unlocked phone, AlarmKit does not draw its full-screen alert at all. It shows your Live Activity, so Wakr’s Dynamic Island and banner layouts carry the same single Start Mission control. Swiping that banner away runs the stop intent, and the same flag covers it.

Surprise two: the volume buttons

In our testing, AlarmKit ends an alerting alarm when either volume button is pressed, and no API turns that off. For most alarms that is a feature. For Wakr it was a way to skip the mission.

So once the mission screen is in front, Wakr takes the ringing over: it silences the system alert, holds the output volume at the alarm level, and starts its own tone. In the code that call is named silence, not stop, and the difference matters. It hands the sound to the app instead of ending the alarm. If silencing fails, Wakr plays nothing extra, because the system alarm is still ringing and two tones would only clash. Wakr waits until it is actually in the foreground before handing over, so a locked phone keeps ringing through AlarmKit.

Surprise three: alarms keep their old configuration

AlarmKit stores the configuration an alarm was scheduled with: its buttons, intents, sound, and labels. An app update that changes any of those leaves alarms already on the device alerting the old way until they are scheduled again.

Wakr keeps a signature for every scheduled alarm, built from its time, weekdays, sound, labels, and a presentation version that is bumped whenever the buttons or intents change. Each sync reschedules only the alarms whose signature changed. It never cancels or replaces an alarm that is alerting, even one that is no longer wanted: that one keeps ringing until its mission is done, and a later sync removes it.

Smaller things worth copying

IDs you can read back. AlarmKit identifies alarms by UUID. Wakr derives each one from its own alarm number: the fixed prefix 57414B52-0000-4000-8000- followed by the number in 12 hex digits. 57414B52 is “WAKR” in ASCII. Any alarm the system reports maps back to its Wakr alarm without a lookup table.

One metadata type, two targets. AlarmKit presents an alarm through a widget extension that declares a Live Activity for your AlarmAttributes type. Without one, the system has nothing to draw on the Lock Screen or in the Dynamic Island. Wakr compiles its metadata struct into both the app and the extension from a single source file, so the attributes resolve to the same type in both processes.

Sounds belong in the app bundle. A named alarm sound is looked up when the alarm fires, with the app not running, so the file has to be a resource in the main bundle. A Flutter asset will not be found.

Do not trade the system alarm for your own tone. An early version stopped the AlarmKit alarm as soon as it rang so Wakr’s chosen tone could play without overlap. That gave up the main thing AlarmKit offers, a locked phone that stays loud with the app not running. The chosen tone is now handed to AlarmKit as a named sound, and Wakr never silences an alerting alarm on its own.

Going back to bed

Finishing a mission and climbing back into bed is the oldest trick there is. Five minutes after a mission is done, Wakr sends a notification asking whether you are still up. If it goes unanswered for three minutes, the alarm rings again as a one-off AlarmKit alarm on a fixed date, with a short math mission. It ends the same way as every other Wakr alarm: with a mission, never a button.

The limits

AlarmKit needs iOS 26 or later. On older versions, Wakr’s alarm still depends on the app staying alive, and the app says so. On iOS 26, the stop button silences the system alert before Wakr runs, so from that moment the alarm depends on Wakr being opened. No software can guarantee that you wake up, and Wakr still recommends a backup alarm for anything that matters.

Sources

  1. AlarmKit, Apple Developer Documentation, accessed October 21, 2026.
  2. Wake up to the AlarmKit API, Apple, WWDC25, June 2025.
  3. alarm, a Flutter plugin for iOS and Android alarms, pub.dev, accessed October 21, 2026.

The one-line version

Use the custom secondary button to open your app while the system alarm keeps ringing, assume the stop button and the volume buttons will silence it, version your alarm configuration, and stop the alarm in exactly one place.

Working with AlarmKit and seeing different behaviour? Write to Ian.

READY WHEN YOU ARE

Make your next alarm a first step.

Choose a mission and start building mornings that move forward.

Download Wakr on the App StoreAvailable now on the App Store. Android is in development.