how do I migrate from clockkit to widget kit ?

Asked on 08/03/2024

1 search

To migrate from ClockKit to WidgetKit for your watchOS app, you can take advantage of the expanded capabilities of widgets in watchOS 11. Here are some key points to consider:

  1. Interactive Widgets: You can now bring interactive widgets to watchOS using the same APIs you're currently using on iOS and macOS. This includes creating widgets with multiple interactive areas that perform actions and update state directly in the widget.

  2. App Intents: Utilize App Intents to create widgets with multiple interactive areas. This allows for actions and state updates directly within the widget.

  3. Accessory Widget Group Layout: This layout allows you to provide more information and interactivity to your customers. It accommodates three separate views and supports both deep linking to different parts of your app and button and toggle initializers to perform actions without leaving the widget.

  4. Relevant Contexts: Specify one or more relevant contexts (such as time of day, AirPods connection, location, and routine) so that the system can insert your widgets into the smart stack at the most useful times.

For more detailed guidance, you can refer to the Platforms State of the Union session, which discusses the expanded capabilities of widgets in watchOS 11.

Relevant Sessions

These sessions will provide you with a comprehensive understanding of how to leverage WidgetKit for your watchOS app.