# Builds

Build iOS and Android apps in the cloud with Ubriot, submit to TestFlight and Google Play, and watch, retry or cancel builds.

Ubriot builds your app in the cloud from your Git repository, signs it with your [credentials](https://docs.ubriot.dev/credentials.md) and, if you ask, submits it to the store.

## Ship a release

`ubriot ship` builds, submits and waits until the store accepts the build:

```bash
ubriot ship ios
ubriot ship android
```

Run it from your app folder and Ubriot reads the app slug from `expo.slug` in app.json, or pass `--app <slug>`. `ubriot ship ios` finishes when TestFlight marks the build valid; `ubriot ship android` finishes when Google Play accepts it on the track.

- `--no-submit` builds without submitting.
- `--profile <profile>` picks the build profile; the default is `production`. Google Play submission needs a production AAB, so preview Android builds need `--no-submit`.
- `--branch <branch>` and `--repo <url>` override what is cloned.
- `--timeout <minutes>` (default 180) and `--poll-interval <seconds>` (default 15) control the wait.

Or open **Builds** in the dashboard and choose **Trigger build**.

## Google Play tracks and rollouts

Android releases go to the `internal` track unless you pass `--track`:

```bash
ubriot ship android --track production --release-status completed --rollout 10 --release-notes "Faster checkout"
```

On the production track a release is a draft unless you pass `--release-status completed`. `--rollout` sets a staged rollout percentage for a live release, above 0 and below 100. These three options require ubriot 1.3.0 or later.

To set a default track or submit every successful build automatically:

```bash
ubriot apps update --app myapp --google-play-track beta --auto-submit-google-play
ubriot apps update --app myapp --auto-submit-testflight
```

## Toolchain checks

Before queueing, `ubriot ship` and `ubriot builds create` read the project's Expo SDK, or its React Native version for bare apps, and warn when no build worker has the Xcode or Node.js it needs. In a terminal it asks before queueing; pass `--yes` to skip the question. In a non-interactive shell, such as CI, it prints the warning and queues the build. This check requires ubriot 1.4.0 or later. See [Expo SDK 58](https://docs.ubriot.dev/expo-sdk-58.md).

## Queue a build without waiting

```bash
ubriot builds create --app myapp --platform ios
ubriot builds submit-testflight <buildId>
```

`builds create` returns as soon as the build is queued. Add `--wait` to wait for it, `--submit-testflight` (iOS) or `--submit-google-play` (Android) to wait and submit.

## Follow a build

| Command | What it does |
|---|---|
| `ubriot builds list --app myapp` | Recent builds and their status. |
| `ubriot builds watch <buildId>` | Stream logs and status until the build and any submission finish. `--no-logs` prints only status changes. |
| `ubriot builds logs <buildId>` | Print the logs. |
| `ubriot builds show <buildId>` | The full build record as JSON. |
| `ubriot builds artifacts <buildId>` | The .ipa, .aab or .apk files the build produced. |
| `ubriot builds queue` | Why your queued builds have not started yet. Requires ubriot 1.3.0 or later. |
| `ubriot builds last-good` | The last successful build per app, platform and profile. Requires ubriot 1.3.0 or later. |

Every build in the dashboard shows the detected Expo SDK, React Native, Xcode and Node.js versions. Failed builds that match a known issue show its fix on every plan; see [AI diagnosis](#ai) for the rest.

## Retry and recover

| Command | When to use it |
|---|---|
| `ubriot builds cancel <buildId>` | Stop a queued or running build. |
| `ubriot builds retry-upload <buildId>` | The build succeeded but uploading its artifacts failed. |
| `ubriot builds reset-testflight <buildId>` | A TestFlight submission is stuck; reset it, then submit again. |
| `ubriot builds reset-google-play <buildId>` | A Google Play submission is stuck; reset it, then submit again. |

## Ask about your builds

```bash
ubriot ask "Why did my last iOS build fail?"
```

The Release Copilot answers from your builds, failures, release health and readiness. Requires ubriot 1.3.0 or later.

## AI diagnosis and plans

AI build diagnosis, the Release Copilot and release intelligence (the release brain and pre-release warnings) are on Pro and Business plans and during the 14-day trial. They follow the plan of the account that owns the app, so team members get them on a Pro or Business owner's apps without a plan of their own. The copilot is available when your own plan includes AI or you can access an app whose owner's plan does, and it only reads or acts on apps whose owner's plan includes AI. On Indie, failed builds still show the fix for a known issue, `ubriot ask` and the copilot API return `402` with the code `plan_upgrade_required`, and the dashboard shows an upgrade prompt in place of AI output. Upgrade at [ubriot.dev/dashboard/billing](https://ubriot.dev/dashboard/billing).
