widgetkit
WidgetKit
Glanceable widgets on home screen, lock screen, StandBy, and Control Center. Widgets are not mini apps — they render a system-scheduled timeline of static SwiftUI snapshots in a memory-constrained extension. The deep API reference — extension setup, timeline providers, every family, configuration, interactive widgets, App Group data sharing, lock screen, StandBy, controls — lives in references/guide.md. This file is the decision and discipline layer: read it first, open the guide for specifics.
Dials
Set these explicitly at the start; they change what "correct" means.
CONFIGURATION—static(StaticConfiguration+TimelineProvider; no user options) ·app-intent(AppIntentConfiguration+AppIntentTimelineProvider, iOS 17+; user picks parameters via aWidgetConfigurationIntent— see theappintentsskill).FAMILIES— declare the exactsupportedFamiliesyou actually design and lay out:system{Small,Medium,Large,ExtraLarge}(home screen; ExtraLarge is iPad/Mac) ·accessory{Circular,Rectangular,Inline}(lock screen, iOS 16+) ·control(Control Center / Lock Screen / Action button viaControlWidget, iOS 18+).UPDATE_STRATEGY—timeline(provider returns entries +.after/.atEndreload policy; system budget applies) ·reload(.neverpolicy; main app/intent callsWidgetCenter.shared.reloadTimelines(ofKind:)when data changes) ·push(.neverpolicy + APNsWidgetPushHandler, iOS 18+, for server-driven updates without burning the local budget).
When to use
Building or reviewing any widget, lock-screen accessory, StandBy layout, Control Center control, timeline provider, or widget data-sharing code. If the surface is a Live Activity or Dynamic Island, use activitykit (it shares the WidgetKit bundle but is driven by ActivityKit, not timelines). If the work is the AppIntent itself — widget configuration parameters or the intent behind an interactive Button/Toggle/control — use appintents.