Add a Home Screen widget to your app
Ask your Agents for a widget, add it to the Home Screen of a Preview device, and check it on your own iPhone.
A widget shows a piece of your app on the Home Screen, such as today’s count or the next task, without opening the app. Your Agents add it to your app as an extension, a part of the app that iOS shows on its own. You try it on the Home Screen of a Preview device, then on your own iPhone.
This page is about a widget for the app you’re building. For AirBuild’s own widgets, see Add AirBuild widgets to your Home Screen.
Ask for a widget
- Open the project’s chat.
- Say what the widget should show, in which sizes (small, medium or large), and what tapping it should open.
- Send it. The Agents add the widget and build the app again.
For example:
Add a Home Screen widget that shows how many glasses of water I've had today. The small one shows the count, the medium one adds a bar for the day. Tapping it opens today's log.A widget that shows what people saved in the app usually reads it through an App Group, which the Agents turn on for the app. See Turn on iCloud, App Groups or another capability.
When the build is ready, the project’s chat shows New version ready with Open Preview. See Open the Preview when a new build is ready.
See it in Preview
Preview has no widget button of its own. Its Home Screen is the device’s own, and you add the widget the way you would on an iPhone.
- Open Preview with the latest build. See Run your app in Preview.
- Tap Home to go to the Home Screen.
- Touch and hold an empty part of the screen until the apps jiggle (on the Mac, click and hold). Start in the middle of the screen: a press that starts at the very top or bottom edge is taken as a swipe from the edge.
- Tap Edit, then Add Widget.
- Find your app in the list, swipe to the size you want, and tap Add Widget.
- Tap Done.
Each size is its own widget, so add each size you asked for. Tap the widget to check what it opens.
To point at something on the widget, use Screenshot or Draw in Preview and send it to the Agents. See Run your app in Preview.
The Preview devices are shared by the Team, so the people in your Team see the widget you add.
Check it on your iPhone
To see the widget on your own Home Screen with your own data, put the build on your iPhone, then add the widget as in steps 3 to 6 above:
- Install it from AirBuild. See Install your app on your iPhone. Installing from AirBuild is in the TestFlight and direct-download builds of AirBuild, not the App Store build.
- Or get it through TestFlight. See Share a beta with TestFlight.
See what the widget declares
If the widget declares App Intents, for example for a button on it, the project’s profile lists them. Open Siri & Shortcuts in the profile: they’re under Extension, with the extension’s bundle ID. See Let people use your app from Siri and Shortcuts.