activitykitlisted
Install: claude install-skill dpearson2699/swift-ios-skills
# ActivityKit
Build real-time, glanceable experiences on the Lock Screen, Dynamic Island,
StandBy, CarPlay, and a paired Mac using ActivityKit. Patterns target iOS 26+
with Swift 6.3, backward-compatible to iOS 16.1 unless noted.
See [references/activitykit-patterns.md](references/activitykit-patterns.md) for complete code patterns including push payload formats, concurrent activities, state observation, and testing.
## Contents
- [Workflow](#workflow)
- [ActivityAttributes Definition](#activityattributes-definition)
- [Activity Lifecycle](#activity-lifecycle)
- [Lock Screen Presentation](#lock-screen-presentation)
- [Dynamic Island](#dynamic-island)
- [Push-to-Update](#push-to-update)
- [iOS 26 Additions](#ios-26-additions)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)
## Workflow
### 1. Create a new Live Activity
1. Add `NSSupportsLiveActivities = YES` to the host app's Info.plist.
2. Define an `ActivityAttributes` struct with a nested `ContentState`.
3. Create an `ActivityConfiguration` in the widget bundle with Lock Screen
content and Dynamic Island closures.
4. Start the activity with `Activity.request(attributes:content:pushType:)`.
5. Update with `activity.update(_:)` and end with `activity.end(_:dismissalPolicy:)`.
6. Forward push tokens to your server for remote updates.
### 2. Review existing Live Activity code
Run through the Review Checklist at the end of this document.
## ActivityAttributes