SwiftUI & UI Frameworks / 20:20

WidgetKit foundations

SwiftUI & UI Frameworksiosipadosmacosvisionoswatchos

Key Points

  • Widgets highlight an app most important content across the system, providing people with another opportunity to engage.
  • Covers widget types and the qualities that make widgets memorable.
  • Explains how to create widgets, keep them up to date, and offer ways for people to customize them through App Intents and dynamic styling.
  • The session moves through Fundamentals, Integrate with an app, Adapt with the system.
  • Key concepts include WidgetKit, App Intents, SwiftUI, UIKit, WidgetCenter, AppIntentConfigurations, DailyReadingGoalView.
  • Platform coverage: ios, ipados, macos, visionos, watchos.

Condensed Flow

01

Fundamentals:

Focuses on WidgetKit, SwiftUI.

02

Adapt with the system:

Focuses on SwiftUI.

More Detail

Additional details

  • WidgetKit widgets should focus on glanceable, high-value content rather than reproducing the full app UI at a smaller size.
  • SwiftUI supplies the widget view, while WidgetKit handles system placement across surfaces such as the Home Screen, Lock Screen, StandBy, and watchOS.
  • `WidgetCenter` is the mechanism for asking the system to refresh timelines when app data changes.
  • `AppIntentConfiguration` lets widgets expose user customization without building a separate custom settings UI.
  • Deep links or URLs should take people from a widget directly to the relevant app content, not just the app's home screen.

Resources