iOS CapabilitiesLesson 61Free preview
Widgets & Extensions
This lesson is part of Swift · All levels
Summary
This lesson reviews the creation of Widgets on iOS using the WidgetKit and SwiftUI frameworks. The widget displays relevant concise information directly on the Home Screen, Lock Screen, and StandBy modes without the need to open the main application. Developers will learn the concept of TimelineProvider that governs the timing of widget content updates.
Key points
- WidgetKit allows the creation of main screen widgets using SwiftUI
- Widgets are built as a separate App Extension target within the Xcode project
- TimelineProvider generates a timeline entry sequence for scheduled updates
- Supports a wide variety of widget family sizes: systemSmall, systemMedium, systemLarge, and accessory
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.