# App Package

> The sheet that builds your project's iPhone and iPad app as an unsigned .ipa, with the Xcode archive beside it, and keeps the latest three on this device to save or share.

Source: https://air.build/docs/screens/home/app-package/

> [!NOTE]
> Not in the App Store version of AirBuild. The TestFlight and direct-download versions have it.

**App Package** is the sheet that builds your project's iPhone and iPad app as a file, and keeps the latest packages on this device. Each package is an unsigned `.ipa` with, beside it, the Xcode archive it came from. Nothing on the sheet asks for a device or an Apple team: whoever installs the package signs it. On the Mac you save the files to Downloads; on iPhone and iPad you share them, for example to Files or by AirDrop.

The project's packages for the whole Team, how long they're kept and what each one cost are on the **App Packages** page; see [Build and download an app package](https://air.build/docs/build/app-packages/).

## Open it

**iPhone**

- **From App Packages:** tap **Build New Package**. On iPad the sheet opens with the build already started. On iPhone the row turns into the build, with its step and the time so far; tap it for the build steps.
- **From a build under way:** in App Packages, tap the row of a build you started on this device. It opens on that build; it never starts a new one.
- **From Install on Device:** when a build can't be signed for a device, tap **Download App Package**. [Install on Device](https://air.build/docs/screens/home/install-on-device/) closes and this opens.

**Mac**

- **From the project's menu:** choose **Project › Install › Build New Package** in the menu bar, or **Install › Build New Package** from the sidebar's right-click menu or **⋯** (**More**) in the chat's toolbar. The sheet opens with the build started.
- **From App Packages:** click **Build New Package**, or the row of a build you started on this Mac.
- **From Install on Device:** click **Download App Package** under a failure.

If a build is already running for the project, the sheet opens on that build rather than starting a second one.

## What's on it

### Before a build

| Item | What it does |
| --- | --- |
| **Build Package** | Builds a package of the project's current code. Reads **Build New Package** once this device has packages. |
| "This device keeps the latest three packages." | The note under the button. |
| Packages | The project's packages on this device, newest first. See [Packages](https://air.build/docs/screens/home/app-package/#packages). While the list loads, placeholder rows stand in its place. |
| **Done** | Closes the sheet. On the Mac, Return presses **Done**. |

### While it builds

**Build Steps** lists four steps. Each has a ring that turns while the step runs, fills while it can count, and turns into a check when it's done. Next to the running step is its percentage, or how long it has taken.

| Step | What's happening |
| --- | --- |
| **Preparing Build** | The build is being set up and waits its turn. |
| **Building App** | The app is being built. |
| **Downloading Package** | The package is coming to this device. |
| **Saving Package** | The package is being kept on this device. |

The footer says "The build keeps going if you close this page. The package appears here when it’s ready." The button at the top reads **Close**. Your other packages are hidden until the build ends.

When the build succeeds, every step shows a check, the footer goes, the button reads **Done** again, and the packages come back with the new one first. The build button doesn't come back until you open the sheet again.

When the build fails, the steps stay: the ones before the failure show a check, the failed one an exclamation mark in a circle, and the ones after it stay unstarted. The message and its buttons show under them; see [Messages](https://air.build/docs/screens/home/app-package/#messages).

### Packages

Each package has its own section. Its header gives the app's name and when the package was made, and **Imported** for an `.ipa` you brought in yourself.

| Row | What it shows | Button |
| --- | --- | --- |
| **IPA** | The app, and its size. | Mac: **Save to Downloads**, then **Show in Finder**. iPhone and iPad: **Share…** |
| **Xcode Archive** | The archive the app came from, and its size. Only when the package has one. | The same. |

Files are named after the app: `App Name.ipa` and `App Name.xcarchive.zip`. On the Mac, **Save to Downloads** shows a spinner until the copy is done; the other buttons wait meanwhile.

## Build and save a package

1. Open **App Package** and tap **Build Package** (or **Build New Package**).
2. Wait while **Build Steps** tick off. You can close the sheet; the package appears here and in App Packages when it's ready.
3. Under the new package, click **Save to Downloads** on the Mac, or tap **Share…** on iPhone and iPad and choose where it goes.

To put the `.ipa` on an iPhone, see [Install on Device (Mac)](https://air.build/docs/screens/home/mac-installer/), or ask someone with the right Apple team to sign it.

## Messages

| Message | What it means | What to do |
| --- | --- | --- |
| **The package couldn’t be built.**, with the build's first line of error | The project didn't compile for iPhone. | Tap **Ask Agents to Fix**: it posts "The app package couldn’t be built: “_error_”. Please fix the project so it builds for iPhone, then build the package again." in the project's chat as your message and closes the sheet. Or tap **Try Again**. |
| "The build didn’t finish. Try again." | The build stopped. | Tap **Try Again**. |
| "The workspace stopped responding. Try again." | AirBuild lost track of the build. | Tap **Try Again**. In a local Team, check that the Mac running it is on with AirBuild open. |
| "This workspace’s environment needs an update before it can build a package. Try again after it updates." | The Mac running the Team has an older AirBuild. | Update AirBuild there, then **Try Again**. |
| "This package was built on the host Mac. Open AirBuild on that Mac to save it." | In a local Team, the package stays on that Mac. | Open AirBuild on the Mac that runs the Team. |
| "The file couldn’t be saved to Downloads. Try again." | Mac: the copy failed. Shown under the packages. | Click **Save to Downloads** again. |

Every build failure shows **Try Again**, which starts a new build; **Ask Agents to Fix** is only there for **The package couldn’t be built.** The failed step shows an exclamation mark in a circle. **Ask Agents to Fix** is dimmed where there's no chat to post to.
