Widget extension structure, AlarmKit integration, and Live Activities implementation
This skill covers the Widget extension implementation for iOS 26.0+ AlarmKit Live Activities, including structure, components, intents, and AlarmKitManager integration.
Use this skill when:
Live Activity support for study alarms using iOS 26's AlarmKit framework.
Location: Projects/App/Extensions/Widget/
Structure:
Widget/
├── Sources/
│ ├── LiveActivityWidget.swift # Main widget with Dynamic Island + Lock Screen
│ ├── AppWidgetBundle.swift # Widget bundle
│ ├── StudyAlarmMetadata.swift # Shared metadata model
│ └── Intents/
│ ├── PauseIntent.swift # Pause alarm (LiveActivityIntent)
│ ├── ResumeIntent.swift # Resume alarm (LiveActivityIntent)
│ └── StopIntent.swift # Stop alarm (LiveActivityIntent)
├── Resources/
│ └── Assets.xcassets/
└── Configs/
├── debug.xcconfig # IPHONEOS_DEPLOYMENT_TARGET=26.0
└── release.xcconfig # IPHONEOS_DEPLOYMENT_TARGET=26.0
Shared Code Pattern:
StudyAlarmMetadata.swift lives in Widget's sourcesProject.swift sources arrayLiveActivityWidget.swift:
AlarmAttributes<StudyAlarmMetadata>: Live Activity attributesAlarmProgressView: Circular progress with book icon, handles countdown/paused statesAlarmControls: Resume button (paused state) + Stop button with LiveActivityIntentWidget Intents (all use LiveActivityIntent):
PauseIntent: Calls AlarmManager.shared.pause()ResumeIntent: Calls AlarmManager.shared.resume()StopIntent: Calls AlarmManager.shared.stop()AlarmKitManager (App target only, iOS 26.0+):
requestAuthorization(), isAlarmKitAvailableAlarm → AlarmKit configuration
UserNotificationManager for iOS 18-25 when AlarmKit unavailable