live-activities

Installation
Summary

Real-time Lock Screen and Dynamic Island widgets for iOS using ActivityKit.

  • Define ActivityAttributes with static data and dynamic ContentState; start activities with Activity.request(), update with activity.update(), and end with activity.end()
  • Design three Dynamic Island presentations: compact (icon + one value), minimal (single glyph), and expanded (multi-region layout with leading, trailing, center, bottom)
  • Push-to-update via APNs with pushType: .token, forwarding tokens through activity.pushTokenUpdates and sending JSON payloads matching your ContentState structure
  • Handle stale dates with context.isStale to show fallback UI; always end activities to prevent Lock Screen clutter
  • iOS 26 adds scheduled activities, transient style, Mac menu bar support, and channel-based push for broadcast updates
SKILL.md

Live Activities and Dynamic Island

Build real-time, glanceable experiences on the Lock Screen, Dynamic Island, StandBy, CarPlay, and Mac menu bar using ActivityKit. Patterns target iOS 26+ with Swift 6.2, backward-compatible to iOS 16.1 unless noted.

See references/live-activity-patterns.md for complete code patterns including push payload formats, concurrent activities, state observation, and testing.

Contents

Related skills

More from dpearson2699/swift-ios-skills

Installs
466
GitHub Stars
562
First Seen
Mar 3, 2026