Introducing widgets and WidgetKit
In this section, we are going to learn about the basics of WidgetKit and the options and guidelines for widgets in iOS 14.
Users and developers have been requesting a particular feature for years: they all wanted to have widgets on their home screen. Widgets allow users to configure, personalize, and consume little pieces of relevant data from their home screen. They also enable developers to offer users glanceable content and create added value to their apps.
Here is a preview of what a widget (in this case, the Calendar and Reminders widgets) looks like on the home screen of the iPhone:
This is now possible on iOS 14 and macOS 11 and later. Developers can create widgets across iOS, iPadOS, and macOS using WidgetKit and the new widget API for SwiftUI.
Smart Stack on iOS 14 contains a set of different widgets, including ones that the user opens frequently. If the user...