# Run your app in Preview

> Open your project's latest build on a Team device, pick an iPhone, iPad, Apple Watch, Android phone or handheld, and use it from AirBuild.

Source: https://air.build/docs/build/preview-your-app/

Preview runs your project's latest build on a device that belongs to your Team: an iPhone or iPad, the Apple Watch paired with each iPhone, and, in beta, Android phones and PocketJS handhelds. You use the device from inside AirBuild. It's the same device your Agents use when they check the app, so you can watch their work there too.

Where the devices run depends on your Team. In a cloud Team they run in the cloud, and the time counts toward **Cloud Builds and Previews** in Settings › [Plan & Usage](https://air.build/docs/settings/plan-usage/). In a local Team they run on the Team's Mac. See [Choose where your Agents run](https://air.build/docs/get-started/where-agents-run/).

## Open Preview

**iPhone**

In the project's chat, tap **Preview** in the top-right corner. You can also tap the tabs button (four squares) in the top-right corner and tap **Preview**.

**Mac**

Open the project's chat and choose **Project › Preview**. You can also click **⋯** (**More**) in the toolbar, right-click the project in the sidebar, or choose **View › Go To › Preview**.

Preview opens right away and then installs the project's latest build. The line over the device (on iPhone, under **Preview** in the navigation bar) says what's happening: **Starting Environment**, **Installing** with a percentage, **Opening**, then **Installed**. A Team that was asleep can take a while to start.

If the project has never been built, the app says "“_App_” Is Not Ready" and "No installable build is available for this app yet." Ask an Agent in the project's chat to build the app, then open Preview again.

While Preview is open, choosing another project installs that project's app on the device.

## Choose a device

**iPhone**

Tap the device name in the navigation bar to open the device menu.

**Mac**

Click the device name over the device to open the device menu.

The menu lists one row per device model. A check marks the one you're looking at, and devices that are on are marked as running. Picking a device moves only your view; it doesn't change the device anyone else in the Team sees. A device that's off starts when you pick it.

| Group | What's in it |
| --- | --- |
| iPhone and iPad models | The Team's iPhones and iPads. Each iPhone has an Apple Watch. On iPhone you open it from the **Apple Watch** tool, not from this menu. On the Mac the group ends with one **Apple Watch** row: the watch of the iPhone on screen, or else the Team's first. Choosing it opens the watch beside its iPhone (moving to that iPhone first if needed); choosing it again hides it. |
| **PocketJS Beta** | PSP, PS Vita and Nintendo 3DS. See [Make an Android or PocketJS version (beta)](https://air.build/docs/build/android-and-pocketjs/). |
| **Android Beta** | The Team's Android phones. A local Team has no **Android Beta**, because Android apps build in cloud Teams only. |

The kinds of app your project builds come first. On iPhone, the other kinds are folded into a submenu of their own; on the Mac they're left out. A device the project has no app for says "No Android build yet" (or "No iOS build yet") under its name.

To turn a device off, choose **Shut Down** _device_ from the menu. On the Mac, a running device's row says **Running**; open it for **Shut Down** and **Restart**.

## Use the device

Click or tap the screen to use it like the real device. The controls are in the inspector's bar on the Mac and in the navigation bar on iPhone, where everything besides **Home** and the app's icon is under **⋯**.

| Control | What it does |
| --- | --- |
| **Reinstall** (Mac), the app's icon (iPhone, **Restart App**) | Installs the project's latest build again and opens it, even if the app is already open. |
| **Home** | Goes to the Home Screen. Android phones also have **Back**. |
| **Rotate** | Turns the device. |
| **Enter Full Screen** | Shows the device on its own, without the chat. **Exit Full Screen** brings the chat back. |
| **Screenshot** | Puts a picture of the screen in the chat's message box, so you can send it to your Agents. |
| **Draw** | Lets you draw on the screen and ask about it. Type in "Ask about the screen…", then **Send Drawing**. |
| **Type Text** (Mac) | Sends text to the field you clicked on the device, including text your keyboard can't type key by key. Type it, then click **Send**. On iPhone, use the device's own keyboard. |
| **Passwords** | Fills a login from your Team's saved passwords. Tap the field on the device first, then choose the entry and **Fill Username** or **Fill Password**. **Add Password…** adds one. See [Save logins for Agents](https://air.build/docs/agents/save-logins-for-agents/). |
| **Apple Watch** (iPhone) | Opens the iPhone's Apple Watch beside it. On the Mac, use the **Apple Watch** row in the device menu. |
| **Sound** | **Volume Up** and **Volume Down**, and **Device Sound** to turn the device's sound in AirBuild off or on. |
| **Device Color** | Changes the color of the device's frame. |

On iPhone and iPad, **Customize Frequent Tools…** in the device's menu chooses which tools stand in the row of frequent tools.

The devices are shared by the Team. If someone else is using the one you're on, the screen says "Another user is controlling Preview."

> [!TIP]
> Agents use the same devices with the `simulator` command. See [simulator](https://air.build/docs/cli/simulator/) for what they can do with them.

## Questions

If the app can't be installed or opened, AirBuild shows **Unable to Run App** with one of these messages:

| What you see | What to do |
| --- | --- |
| "No build available. Ask the agent to build the project." | Ask an Agent to build the app, then tap **Reinstall** (on iPhone, the app's icon). |
| "This project is not configured for building. Ask the agents to configure it." | Tap **Request Build Setup**. It sends the request to the project's chat. |
| "This app is made for iPhone only. Choose an iPhone Preview to run it." | Pick an iPhone in the device menu, or tap **Add iPad Support** to ask your Agents to add it. See [Make your app work on iPad (or on iPhone)](https://air.build/docs/build/make-your-app-work-on-ipad/). |
| "This app is made for iPad only. Choose an iPad Preview to run it." | Pick an iPad, or tap **Add iPhone Support**. |
| "The environment is still starting. Try again in a moment." | Wait a moment and try again. |
| "The latest build of _App_ can't be installed yet. Try again in a moment, or rebuild the app." | Try again shortly, or ask an Agent to build again. |
| "This build is no longer available. Rebuild the app." or "The build could not be unpacked. Rebuild the project." | Ask an Agent to build the app again. |
| "The build's preview settings could not be read. Update AirBuild or rebuild the app." | Update AirBuild, or ask an Agent to build again. |
| "Update AirBuild on the host Mac to install this build." | In a local Team, update AirBuild on the Team's Mac. |
| "The host Mac is offline. Open AirBuild on it to bring this team back." | Open AirBuild on the Mac that runs the Team. |
| "Preview connection timed out. Try again." or "Unable to install the app on Preview. Try again." | Try again. |

**There's a See plans button where the device should start.**

Your Team is out of cloud time for Previews. See Settings › [Plan & Usage](https://air.build/docs/settings/plan-usage/).

**Can I run my app on my own iPhone instead?**

Yes. See [Install your app on your iPhone](https://air.build/docs/build/install-on-your-iphone/).
