How to build a widget
Generated on 1/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.

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.

Build a great Lock Screen camera capture experience
Find out how the LockedCameraCapture API can help you bring your capture application’s most useful information directly to the Lock Screen. Examine the API’s features and functionality, learn how to get started creating a capture extension, and find out how that extension behaves when the device is locked.

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.

Design Live Activities for Apple Watch
Starting in watchOS 11, Live Activities from your iOS app will automatically appear in the Smart Stack on a connected Apple Watch. Learn how to optimize the layout of your Live Activity for the wrist, and provide the right level of information and interactivity at the right time.