After the WWDC 2022 keynote speech at 1 a.m. Beijing time today, Apple introduced many new features and experience improvements of IOS 16 and watchos 9 at the developer briefing The most interesting thing is that developers can reuse relevant code on the lock screen interface of mobile phones and the apple watch dial with the help of the widget development tool widgetkit
This Cupertino technology giant introduced in detail that developers can now build different types of widgets for IOS 16 lock screen.
Inspired by the complexity of Apple watch, Apple It also claims that these new widgets can help developers take advantage of key information in their applications and display it at a glance.
*Even better, all these lock screen widgets can now run on both IOS and watchos platforms * - because from watchos 9, complex functions will also be supported based on widgetkit.
This means that developers can use the same code on both platforms, and Apple's official development tools will automatically resolve the differences during this period.
By default, widgets are created using the appropriate system fonts. In addition, to enhance readability, the lock screen widget will be shaded.
*At the beginning of the release, apple provided developers with three preset solutions, * which are circular, rectangular, and inline.
● first of all, the round widget is very suitable for displaying small images, pages or text with only a few characters. For example, it is convenient for users to know the activity of the day and whether they should go running and fitness (fill the circles of each item).
● secondly, the rectangular widget design can provide a larger canvas display area, which Apple explained is more suitable for displaying weather forecasts and other content.
● in addition, the inline widget provides a way to convey information through SF symbols in a small amount of text - 4000+ different symbols have been included in the current official icon library.
Widgetkit update will officially come with IOS 16 this fall
These inline widgets will be displayed next to the lock screen clock / system date string, such as "month 6 / Monday".
In the example of WWDC 2022 meeting arrangement, apple shows how this widget will display weather information based on the clock interface.
For example, in this example, the sun symbol immediately after the date represents the weather, and the user's city information is displayed immediately after the date.
In fact, the widgetkit widget development kit covers IOS and ipad OS and MacOS.
With the official arrival later this year, developers are also expected to bring more rich and novel widgets, as well as complex function experiences for the watchos platform.
If you like personalized experiences such as brass and widgetsmith, you can set matching widgets for the main screen, lock screen and watch, and customize them on all devices in the same way.
Another new feature allows widgets to display real-time information. Developers will be able to create live activities built using the swift UI to provide the latest information on the lock screen interface.
Like widgets, these live activity components are built on the basis of widgetkit. The biggest difference between it and standard widgets is that developers can update the rendering status of live activities in real time.