Build or review Live Activities and Dynamic Island experiences with ActivityKit, including lifecycle, layouts, push updates, and scheduled delivery. Use for time-sensitive Lock Screen or Dynamic Island state; route ordinary widgets to widgetkit.
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
ActivityKit owns real-time, glanceable Live Activities on the Lock Screen and
Dynamic Island. Route ordinary timeline widgets to widgetkit and generic APNs
setup to push-notifications; keep the Live Activity lifecycle, token handling,
and payload contract here.
Modern ActivityContent lifecycle APIs require iOS 16.2+ unless noted. The
server's aps.content-state must decode into the exact
ActivityAttributes.ContentState shape, including coordinated custom date or
range encoding.
For a new Live Activity:
NSSupportsLiveActivities = YES.ActivityAttributes from a small, Codable, Hashable
ContentState; encode a representative server fixture before integrating APNs.ActivityConfiguration for the Lock Screen first, then compact,
minimal, and expanded Dynamic Island presentations.ActivityAuthorizationInfo.areActivitiesEnabled, request with
ActivityContent, and exercise local update plus every terminal end path.Keep static identity in the outer attributes and only changing display state in
ContentState:
import ActivityKit
struct DeliveryAttributes: ActivityAttributes {
let orderNumber: Int
struct ContentState: Codable, Hashable {
var stage: String
var estimatedDelivery: ClosedRange<Date>
}
}Use ActivityContent for request, update, and end. Set staleDate whenever the
display can become misleading, and render a safe fallback from
ActivityViewContext.isStale. Treat Lock Screen content as public: never place
secrets or sensitive detail in attributes or state.
.default dismissal
linger (up to 4 hours after ending)..token for per-activity remote updates. Observe
activity.pushTokenUpdates for the full activity lifetime because tokens rotate.Activity<Attributes>.pushToStartTokenUpdates; it is not an
app APNs token or an activity update token. Its payload requires an alert.apns-push-type: liveactivity. Device-token
pushes use <bundle-id>.push-type.liveactivity as the topic. Priority controls
delivery urgency; only aps.alert requests visible alert behavior.NSSupportsLiveActivitiesFrequentUpdates requests a larger system-managed
budget, not a guaranteed cadence. Check frequentPushesEnabled.| Feature | Availability and constraint |
|---|---|
| Push-to-start | iOS 17.2+ |
style: request parameter | iOS 18+; .standard for persistent work, .transient only for short-lived expanded presentation |
| Channel/broadcast updates | iOS 18+; update/end only, not start |
| Supplemental activity families | iOS 18+ |
| Scheduled start | iOS 26+ |
| Paired Mac and CarPlay presentation | iOS 26+; validate compact layouts and noninteractive CarPlay behavior |
Use availability guards around each newer API. Read the lifecycle reference for complete request and payload examples rather than combining signatures from different OS branches.
contentState request/update/end overloads instead of
ActivityContent.aps.alert.ContentState have a small, tested Codable contract.NSSupportsLiveActivities = YES and authorization is checked.ActivityContent.content-state fixtures are validated.thienqo/ios-skills
6bf8b62
Canonical home
since May 23, 2026
Also appears in
on Sep 6, 2026
since May 22, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.