Apple introduced Live Activity with the launch of a new framework called ActivityKit. We will be using Xcode version 14.1 as this framework has only been introduced for Xcode 14.1 and iOS 16.1.
We will be building a focus timer using Live Activities. Here is a preview of what we will be building.
But before we jump into the code, let’s learn a bit more about Live Activities.
Live Activities can be used to display real-time data from our apps directly on your iphone's lock screen and on Dynamic Island. Unlike Lock Screen widgets, Live Activities give us a bit more flexibility regarding UI and allows app users to see information at a glance.
Live Activities live under WidgetKit, so to add Live Activity support for apps, you would either have to add code to the existing widget extension (if your app already provides widgets as a part of functionality) or add a new WidgetKit…