Community-maintained Agent Skills for complete Swift and Apple-platform app delivery.
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Medium
Suggest reviewing before use
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..tessl-plugin
skills
accessorysetupkit
references
activitykit
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
audioaccessorykit
references
authentication
references
avfoundation-audio
references
avkit
background-processing
references
browserenginekit
callkit
references
carplay
cloudkit
contacts-framework
references
core-bluetooth
references
core-data
core-haptics
references
core-motion
references
core-nfc
references
coreml
references
cryptokit
cryptotokenkit
debugging-instruments
device-integrity
references
energykit
references
eventkit
family-controls
references
financekit
focus-engine
gamekit
git-branching-workflow
references
healthkit
references
homekit
references
ios-accessibility
ios-app-workflow
references
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
metrickit
references
musickit
references
natural-language
paperkit
references
passkit
references
pdfkit
pencilkit
references
permissionkit
references
photokit
push-notifications
quicklook
references
realitykit
references
relevancekit
references
scenekit
sensorkit
shazamkit
references
speech-recognition
references
spritekit
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
swift-codable
references
swift-code-review
swift-concurrency
swift-formatstyle
references
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-responsive-layout
swiftui-uikit-interop
swiftui-webkit
tabletopkit
tipkit
vision-framework
weatherkit
references