@klyftig/alarm-kit
v0.1.0
Published
iOS 26+ AlarmKit bridge: OS-owned alarms that fire even when the app is killed (schedule/cancel/stop, authorization, alerting query)
Maintainers
Readme
@klyftig/alarm-kit
Expo native module (iOS only): a thin bridge over Apple's AlarmKit (iOS 26+)
— OS-owned alarms that fire even when the app is killed and break through
silent mode / Focus. Extracted from Sleepwise's modules/sleepwise-alarm-kit
(2026-09-15); the Swift identifier is still SleepwiseAlarmKit.
import { alarmKit, isAlarmKitAvailable, getAlarmKitAuthorization, requestAlarmKitAuthorization } from '@klyftig/alarm-kit';
if (isAlarmKitAvailable() && (await requestAlarmKitAuthorization()) === 'authorized') {
await alarmKit.schedule(id, fireAtMs, label); // the alert's Open button deep-links into the app
alarmKit.stop(id); // after the mission is cleared
}
alarmKit.getAlerting(); // ids currently ringing (fire-handler polling)
alarmKit.listScheduled(); // { id, fireAt }[]- Weak-linked and
#available-guarded: on iOS < 26 (and on Android / jest)isAlarmKitAvailable()isfalseand every call is a no-op. @klyftig/alarm-core'siosCoordinatorpicks one path per alarm (AlarmKit when available + authorized, otherwise a time-sensitive notification), so the two never double-fire.- Requires
NSAlarmKitUsageDescriptionin Info.plist —@klyftig/alarm-core's config plugin adds it.
Never run on a physical iPhone yet (simulator build only). Validation
items live in @klyftig/alarm-core/TEST_PROTOCOL.md. Known follow-ups: bundled
alarm tone for the AlarmKit alert, Live Activity widget extension.
