> ## Documentation Index
> Fetch the complete documentation index at: https://docs.10x.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview your iOS app on the iPhone Simulator

> Compile and run your generated iOS app on the Simulator, capture named screenshots, and let 10x repair build errors automatically — no Xcode switching needed.

The Simulator preview compiles your generated Swift code, boots an iPhone Simulator, installs your app, and captures a screenshot shown directly inside 10x. You can watch the app update as you iterate, save screenshots for later reference, and jump into Xcode whenever you need more control.

## Trigger a preview

After 10x generates your code, the preview panel shows a **Preview on Simulator** button alongside a list of the files that were written. Click it to kick off your first build. Subsequent code changes trigger a new preview automatically once a build completes.

<Note>
  At least one iPhone Simulator runtime must be installed in Xcode before you can run a preview. Add runtimes in **Xcode > Settings > Platforms**.
</Note>

While a build is in progress, a status banner appears at the top of the preview panel with the current step — for example, "Building…" or "Launching app…".

## Live mode and Saved mode

The toggle at the top of the preview panel switches between two modes:

<CardGroup cols={2}>
  <Card title="Live" icon="dot-circle">
    Shows the latest screenshot from the running Simulator. The preview border glows to indicate an active connection. As you navigate the app in the Simulator, 10x tracks the current view name and updates the label beneath the screenshot.
  </Card>

  <Card title="Saved" icon="images">
    Shows your captured screenshot library. Click any thumbnail to display it at full size in the preview canvas. Saved screenshots persist across sessions and can be reused in the App Store or shared in chat.
  </Card>
</CardGroup>

## Capture a screenshot

In **Live** mode, a **Capture** button appears beneath the preview image. Click it to save the current screenshot to your Captured library. A brief confirmation — for example, "Saved Screen 1" — appears next to the mode toggle.

<Tip>
  Capture screenshots at each key screen of your app as you build. They make it easy to share progress in chat or use as App Store assets later.
</Tip>

## Manage saved screenshots

In **Saved** mode, the Captured section shows a scrollable row of thumbnail cards. To rename or delete a screenshot:

<Steps>
  <Step title="Open the Manage sheet">
    Click **Manage** in the Captured section header. A sheet opens listing all your saved screenshots with their pixel dimensions.
  </Step>

  <Step title="Rename a screenshot">
    Select a screenshot in the main canvas while in Saved mode, then click **Rename** beneath the preview image. Edit the name inline and press **Return** or click **Save**.
  </Step>

  <Step title="Delete a screenshot">
    In the Manage sheet, click the trash icon next to any screenshot you want to remove.
  </Step>
</Steps>

## Build errors

If the build fails, 10x automatically sends the error output to the AI, which attempts to fix the problem and rebuild. Error details appear in the chat panel so you can see what went wrong and what the AI changed.

<Note>
  If the AI can't resolve a build error automatically, the chat panel will ask for your input. You can describe the behavior you expect or paste additional context to help it recover.
</Note>
