How to build a widget
Asked on 01/20/2025
2 searches
To build a widget, you can follow the guidance provided in the WWDC sessions. Widgets are designed for glanceable information and can be configured to show specific data, such as weather updates or calendar events. Here are some key points to consider:
-
Widget Definition: You need to define your widget, which includes specifying the view and timeline provider. This is essential for displaying the content you want to show.
-
App Intents: Widgets often use app intents to perform actions and update states directly within the widget. This allows for interactive elements, such as buttons and toggles, to be included in your widget.
-
Configuration: To make your widget configurable, you can set parameters that allow users to customize what information is displayed. For example, you might allow users to select which trail to show in a hiking app widget.
-
Interactivity: With the latest updates, widgets can include multiple interactive areas that perform actions without leaving the widget. This is particularly useful for creating a seamless user experience.
For more detailed information on building widgets, you can refer to the session "Bring your app’s core features to users with App Intents" which covers the use of app intents in widgets. Additionally, the session "Extend your app’s controls across the system" provides insights into building controls, which are similar to widgets and use the same underlying architecture.
If you are interested in learning more about building controls, you can check out the session Extend your app’s controls across the system (03:04) which covers how to build a control, have it perform an action, and maintain its state.

Catch up on accessibility in SwiftUI
SwiftUI makes it easy to build amazing experiences that are accessible to everyone. We’ll discover how assistive technologies understand and navigate your app through the rich accessibility elements provided by SwiftUI. We’ll also discuss how you can further customize these experiences by providing more information about your app’s content and interactions by using accessibility modifiers.

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.

Platforms State of the Union
Discover the newest advancements on Apple platforms.