How to incorporate widgets
Asked on 07/30/2024
1 search
To incorporate widgets into your app, you can follow several steps and utilize various features introduced in recent WWDC sessions. Here are some key points and sessions that can help you:
-
Creating Widgets:
- Widgets are designed for glanceable information and can be configured to show different data based on user preferences. For example, you can create a widget that shows details of a pinned trail and make it configurable to display different trails (Bring your app’s core features to users with App Intents).
-
Interactive Widgets:
- Interactive widgets allow users to perform actions directly from the widget without opening the app. This feature is available on iOS, macOS, and now watchOS. You can add buttons and toggles to your widgets to make them interactive (What’s new in watchOS 11).
-
Accessory Widget Group Layout:
- The new accessory widget group layout allows you to provide more information and interactivity. It supports multiple views and deep linking to different parts of your app. This layout is useful for creating widgets that need to display multiple pieces of content (What’s new in watchOS 11).
-
Relevant Contexts:
- You can specify relevant contexts for your widgets, such as time of day or location, to ensure they appear when most useful. This helps the system prioritize your widget among others (What’s new in watchOS 11).
-
Controls as Widgets:
- iOS 18 introduces controls, a new type of widget that extends your app's functionality into system spaces like Control Center and the lock screen. Controls focus on actions and succinct information, making them ideal for quick access to app features (Extend your app’s controls across the system).
-
Accessibility:
- Ensure your widgets are accessible by supporting multiple interactions and using app intents to create interactive views like buttons and toggles. Custom actions can enhance the accessibility experience (Catch up on accessibility in SwiftUI).
Relevant Sessions:
- Bring your app’s core features to users with App Intents
- What’s new in watchOS 11
- Extend your app’s controls across the system
- Catch up on accessibility in SwiftUI
By following these guidelines and exploring the mentioned sessions, you can effectively incorporate widgets into your app, making them more interactive, relevant, and accessible.

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.

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
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.