Getting Started with Widgets
Apple introduced WidgetKit during WWDC 2020, which allows you to show relevant content at a glance from your app on the iOS Home screen. This year, Apple made widgets available in four new locations: the Mac desktop, the iPad Lock screen, the new iPhone StandBy mode, and the new Apple Watch Smart Stack.
In this chapter, you’ll implement a widget for your JRNL project that displays your journal entries on the Home and Lock Screens.
You’ll start by adding a widget extension to your app. You’ll configure your widget to display journal entries, and you’ll customize how your widget looks. Finally, you’ll display your widget in different locations.
By the end of this chapter, you’ll have learned how to create and configure a widget, and you’ll be able to implement it for your own apps, so users can see relevant content without having to launch the app itself.
The following topics will be covered...