Widgets in a new guise appeared in 2020 with the release of iOS 14 (HomeScreen widgets). During this time, Apple has released more widget families, as well as added them to the LockScreen in the iPhone and iPad. But interactivity appeared for the first time in iOS 17.
In this article, we will figure out what an interactive widget consists of: creating a Timeline, how interactivity works through the AppIntents library, and then we will write our first interactive widget.
Before writing a widget, you need to figure out what components it consists of:
Timeline Entry
EntryView
TimelineProvider
As a result, we get an interactive widget with UserDefaults storage linked between the main and widget application targets.
