activitykit
ActivityKit
Live Activities — glanceable, real-time updates on the Lock Screen and in the Dynamic Island. The deep API reference — setup, attributes, the full start/update/end lifecycle, push tokens, the widget-extension UI, and the complete delivery-tracker example — 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.
UPDATE_CHANNEL—local(default; foreground app callsactivity.update(_:), cheap, no server) ·push-token(server drives updates via APNs; observeactivity.pushTokenUpdates, requires the push entitlement and a server). Pickpush-tokenwhenever the activity must move while the app is suspended.START_MODE—in-app(default;Activity.requestwhile the app is foregrounded) ·push-to-start(server starts the activity remotely viaActivity.pushToStartTokenUpdates, iOS 17.2+; no app launch needed).DYNAMIC_ISLAND—minimal(compactLeading/compactTrailing + minimal only) ·full-expanded(also implement allDynamicIslandExpandedRegions for the long-press/active presentation). Evenminimalmust still supply compact + minimal — they are not optional.
When to use
Building or reviewing any Live Activity: starting/updating/ending an Activity, defining ActivityAttributes/ContentState, wiring push or push-to-start tokens, or laying out the Lock Screen / Dynamic Island presentations. The presentation itself is a WidgetKit ActivityConfiguration inside a widget extension — for general widget/timeline work reach for widgetkit.