# Build & Run

Build your Xcode project from source and launch it on your iPhone or iPad in one step, by yourself or from your AI agent.

Build & Run takes your Xcode project from source to a running app on your device in one step. Use it from the Inspector, or let your AI agent use it to test every change on real hardware.

## 1. Requirements

* **Xcode** installed on your Mac.
* An Xcode project or workspace that builds for a device, with **automatic signing** turned on.
* [Device MCP Pro](../license.md).

## 2. Build & Run from the Inspector

1. Show the Inspector (<kbd>⌥⌘0</kbd>) and click the **Build & Run** tab.
2. Click **Choose…** and select your project folder, `.xcodeproj` or `.xcworkspace`.
3. Pick a **Scheme**, or leave it on **Automatic**.
4. Pick **Debug** or **Release**.
5. Click **Build & Run**.

The button shows each step as it happens: opening the project, building, installing and launching. When it's done, you see **Succeeded** with the time it took, and the app is running on your device. Click **Stop** to cancel a build.

If the build fails, read the log below the button to see why.

## 3. Build & Run from your AI agent

Ask your agent to build and run your app, for example:

* *"Build the app, run it on my iPhone and check that the home screen loads."*
* *"Fix the layout bug, then run it on the iPad and take a screenshot."*

Your agent builds, installs and launches the app, then taps through it and takes screenshots to check its own work. If the app crashes, the agent can read the crash report, which points to the lines in your code.

{% hint style="info" %}
Device MCP asks you before an agent builds and runs, unless you chose **Always Allow**. See [Approvals](approvals.md).
{% endhint %}

## 4. Over Wi-Fi

Build & Run works over Wi-Fi too, as long as Xcode can also reach the device over the network. If installing over Wi-Fi fails, connect the cable and try again. With a cable, nothing else is needed.
