how to setup a widget from scratch
Asked on 06/16/2025
1 search
To set up a widget from scratch, you can follow these general steps based on the information from the WWDC sessions:
-
Define the Widget: Start by creating a widget definition. This involves setting up the basic structure of your widget, including its view and timeline provider. The timeline provider is responsible for supplying the data that your widget will display.
-
Configure the Widget: Use a widget configuration to define how your widget will behave. This includes setting up the entry provider, which creates the entries that populate your widget's view. For timeline-based widgets, these entries are called Timeline Entries.
-
Design the Widget's Appearance: Consider the design aspects of your widget. For example, in visionOS, widgets can be personalized with different color palettes and styles, such as paper or glass. Ensure your widget looks good across different system color palettes and styles.
-
Add Interactivity: If your widget needs to be interactive, define the actions it should perform. This can be done using app intents, which allow your widget to execute actions when interacted with.
-
Test and Customize: Test your widget across different environments and customize it to fit various spaces. For visionOS, consider how your widget will look when placed in different rooms and how it can be personalized by users.
-
Implement Push Updates: If your widget needs to stay up-to-date with real-time information, implement push updates. This involves creating a widget push handler and adding it to your widget configuration.
For more detailed guidance, you can refer to the session Extend your app’s controls across the system (03:04) which covers building controls, or What’s new in widgets (15:31) for information on relevance widgets and push updates.

Design widgets for visionOS
Learn how you can design beautiful widgets for visionOS 26 that blend effortlessly into someone’s surroundings. Discover how you can add depth to your widget design and customize materials, sizes, and styles for spatial computing. We’ll share how to adapt your existing widgets for visionOS, or design new widgets that feel like real objects.

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 widgets
WidgetKit elevates your app with updates to widgets, Live Activities, and controls. Learn how to bring your widgets to visionOS, take them on the road with CarPlay, and make them look their best with accented rendering modes. Plus, find out how relevant widgets can be surfaced in the Smart Stack on watchOS, and discover how push notifications can be used to keep your widgets up to date.