ios-widgets-and-live-activities
iOS widgets & Live Activities — glanceable, timely, deep-linked
Source: Apple HIG Widgets + Live Activities, developer.apple.com WidgetKit / ActivityKit / App Intents references, WWDC23 Bring widgets to new places / Design dynamic Live Activities, WWDC24 Extend your app's controls across the system, WWDC25 WidgetKit foundations + Live Activities essentials + iOS 26 Liquid Glass widget rendering, and WWDC26 / iOS 27 (Liquid Glass v2 retune + system transparency slider, the Xcode 27 WidgetKit: Implementing Liquid Glass Design notes, Dynamic-Island Siri, Live Activities on Mac/CarPlay) — cross-checked across multiple research passes (June 2026). Currency: iOS 26 is the shipping baseline; iOS 27 (WWDC 2026) is the current cycle — iOS 27 refines Liquid Glass rather than reinventing WidgetKit, so most of this skill carries forward; §3 and §13 flag what's new. Apple's frame: a widget shows timely, glanceable info and deep-links into the app; a Live Activity tracks a live, time-bounded event. Both are SwiftUI-only, non-scrolling, no video.
1. WidgetKit basics
A widget is a SwiftUI extension whose state is driven by a timeline of dated entries the system renders on its own schedule — your code does not run when the widget is on screen.
Widget— the declaration. Itsbodyreturns a configuration:StaticConfiguration(no user options) orAppIntentConfiguration(user-configurable via an App Intent, iOS 17+; replaced the old Intents-Extension flow).TimelineEntry— one dated snapshot (let date: Date+ your data).TimelineProvider(orAppIntentTimelineProvider) — suppliesplaceholder(redacted first paint),snapshot(Gallery/transient), andgetTimeline→ aTimeline(entries:policy:).- Reload policy —
.atEnd(reload after the last entry),.after(date)(reload at a date),.never(onlyreloadTimelines/reloadAllTimelinesfrom the app, e.g. on a data change). - Refresh budget — the system meters background reloads. Practical guidance (not contractual): ~40–70 reloads/day, roughly every 15–60 min; a visible, frequently-viewed widget gets more. Never assume real-time — push the entries you can predict; reload from the app on real changes. Verify-at-source flag: the 40–70 number is widely cited but Apple does not publish a fixed figure (and WWDC 2026 / iOS 27 did not change this); treat as an order-of-magnitude budget, not a guarantee.
2. Widget families (sizes & surfaces)
Set with .supportedFamilies([...]). Render the right layout per widgetFamily (an @Environment value) — never one layout stretched.