how do I migrate from clockkit to widget kit ?

Generated on 8/3/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.

Platforms State of the Union

Platforms State of the Union

Discover the newest advancements on Apple platforms.

Bring your app’s core features to users with App Intents

Bring your app’s core features to users with App Intents

Learn the principles of the App Intents framework, like intents, entities, and queries, and how you can harness them to expose your app’s most important functionality right where people need it most. Find out how to build deep integration between your app and the many system features built on top of App Intents, including Siri, controls and widgets, Apple Pencil, Shortcuts, the Action button, and more. Get tips on how to build your App Intents integrations efficiently to create the best experiences in every surface while still sharing code and core functionality.

What’s new in watchOS 11

What’s new in watchOS 11

Explore new opportunities on Apple Watch, including bringing Double Tap support to your watchOS app, making your Smart Stack widgets even more relevant and interactive, and displaying your iOS Live Activities in the Smart Stack.

Extend your app’s controls across the system

Extend your app’s controls across the system

Bring your app’s controls to Control Center, the Lock Screen, and beyond. Learn how you can use WidgetKit to extend your app’s controls to the system experience. We’ll cover how you can to build a control, tailor its appearance, and make it configurable.

What’s new in SwiftUI

What’s new in SwiftUI

Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.