last update
May 23, 2026
license
MITv1.0.0
format
SKILL.md
- Install
// Downloads SKILL.md into ~/.claude/skills/ios-widget-live-activity/
$ curl -fsSL --create-dirs -o ~/.claude/skills/ios-widget-live-activity/SKILL.md https://claudeskil.com/skills/ios-widget-live-activity/SKILL.md - Invoke
// Inside Claude Code, type the skill name as a slash command
> /ios-widget-live-activity help me ship this - Or just ask
// Claude loads the skill by itself when a request matches its description
> help me ship this
- name:
- iOS Widget & Live Activity Builder
- slug:
- ios-widget-live-activity
- version:
- v1.0.0
- license:
- MIT
- author:
- @chiragthummar16
- categories:
- tags:
- #widgetkit#live-activity#dynamic-island#ios#swiftui
- description:
WidgetKit, Live Activities, Dynamic Island, ActivityKit — the surfaces that drive app re-engagement.
// What you can do with it
- A Widget conforming type with either StaticConfiguration or AppIntentConfiguration, plus supportedFamilies (e.g. .systemSmall, .accessoryRectangular, .accessoryCircular).
- A TimelineProvider (or AppIntentTimelineProvider) implementing placeholder, snapshot, and timeline with a chosen TimelineReloadPolicy (.atEnd, .after, .never).
- An ActivityAttributes struct with its nested ContentState, plus the ActivityConfiguration that renders the Lock Screen view and the DynamicIsland { ... } regions: expanded (DynamicIslandExpandedRegion
- ActivityKit lifecycle: Activity.request(...), activity.update(...), activity.end(...), and observing Activity.pushToken / pushTokenUpdates to forward tokens to your server for APNs liveactivity pushes
README.md
iOS Widget & Live Activity Builder
Scaffolds the engagement surfaces that live outside your app: Home Screen and Lock Screen widgets, Lock Screen Live Activities, and Dynamic Island presentations. It wires up the WidgetKit and ActivityKit boilerplate — the widget extension target, the TimelineProvider, the ActivityAttributes, and the push-token plumbing — so you can focus on the layout and data rather than the ceremony. Built for iOS engineers shipping order-tracking, ride, delivery, sports, or workout features.
When to use it
- You're adding a Home Screen widget and don't want to hand-write a
TimelineProvider,TimelineEntry, andWidgetConfigurationfrom scratch. - You need a Live Activity that shows live progress (delivery ETA, game score, timer) on the Lock Screen and in the Dynamic Island.
- You want server-driven updates to a running activity via ActivityKit push tokens instead of polling.
- You're migrating a
StaticConfigurationwidget toAppIntentConfigurationfor user-editable widgets on iOS 17+.
What it does
The skill generates a Widget Extension target and the matching Swift files:
- A
Widgetconforming type with eitherStaticConfigurationorAppIntentConfiguration, plussupportedFamilies(e.g..systemSmall,.accessoryRectangular,.accessoryCircular). - A
TimelineProvider(orAppIntentTimelineProvider) implementingplaceholder,snapshot, andtimelinewith a chosenTimelineReloadPolicy(.atEnd,.after,.never). - An
ActivityAttributesstruct with its nestedContentState, plus theActivityConfigurationthat renders the Lock Screen view and theDynamicIsland { ... }regions:expanded(DynamicIslandExpandedRegionfor.leading,.trailing,.center,.bottom),compactLeading,compactTrailing, andminimal. - ActivityKit lifecycle:
Activity.request(...),activity.update(...),activity.end(...), and observingActivity.pushToken/pushTokenUpdatesto forward tokens to your server for APNsliveactivitypushes.
It also sets the required Info.plist keys (NSSupportsLiveActivities, NSSupportsLiveActivitiesFrequentUpdates) and shares data through an App Group.
Usage example
curl -fsSL --create-dirs -o ~/.claude/skills/ios-widget-live-activity/SKILL.md https://claudeskil.com/skills/ios-widget-live-activity/SKILL.md
# then, in your project:
claude "scaffold a Live Activity for delivery tracking with an
ETA and progress bar, plus Dynamic Island compact + expanded views"
Starting an activity from the app:
let attributes = DeliveryAttributes(orderID: "A17")
let state = DeliveryAttributes.ContentState(eta: .now.addingTimeInterval(900), progress: 0.4)
let activity = try Activity.request(
attributes: attributes,
content: .init(state: state, staleDate: nil),
pushType: .token
)
Tips & gotchas
- Live Activities only run on a physical device with iOS 16.1+; the simulator won't show the Dynamic Island reliably.
ContentStatemust beCodableand small — APNs payloads for activity pushes are capped (~4KB).- Frequent push updates require the
NSSupportsLiveActivitiesFrequentUpdateskey and are still budgeted by the system; design for throttling. - Widgets and the app must share an App Group, or
WidgetCenter.shared.reloadTimelines(ofKind:)will read empty data.
FAQ
Does it support interactive widgets? Yes — it can wire up AppIntent buttons and toggles (iOS 17+) inside the widget body.
Can I update an activity without a server? Yes, call activity.update(...) locally, but background updates while the app is suspended need APNs push tokens.
Which iOS version? WidgetKit needs iOS 14; Live Activities need 16.1; Dynamic Island APIs target iPhone 14 Pro and later.
$ cat reviews/