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

> ## Agent Instructions
> ## XenoCI Box CI
> To move a repository's macOS CI jobs onto box, follow https://docs.xenoci.com/ci/agent.md. The user only presses Install on GitHub or makes one GitLab runner token; the agent does the rest.
> - Check: `box ci status` (exit 4: sign in first, https://docs.xenoci.com/setup.md).
> - GitHub organization: `box ci connect --org --no-browser --no-wait`, give the user the printed link (https://github.com/apps/xenoci-with-organizations/installations/new), then repeat `box ci accounts` until the owner appears. Personal account: `--personal` (https://github.com/apps/xenoci-with-personal/installations/new).
> - GitHub workflow: change only `runs-on: macos-*` to `runs-on: xenoci` on a branch and open a pull request.
> - GitLab: the user makes a project runner with tag `xenoci` and gives you the `glrt-` token; pipe it to `box ci gitlab connect -` (self-managed: `--url <gitlab url>`), then add `tags: [xenoci]` to the macOS jobs.
> - Watch: `box ci jobs`, `box ci logs <job id> --follow`. Failed job: `box ci jobs --failed`, then `box ci debug <job id>` (failing step, hint, last 200 log lines).

# Automate App Store screenshots in CI

> Build an iOS app and capture simulator screenshots in a repeatable box job, with options for named devices and screen appearance.

You can capture iOS simulator screens as part of a repeatable build workflow. `box screenshot` builds the app, opens it on an iPhone simulator and saves a PNG. The same command can run locally or as part of a CI workflow.

## Capture a screenshot

From the project folder, run:

```bash theme={"system"}
box screenshot screenshots/home.png
```

The job's logs and saved image are returned under `.box/out/<job>/`. Add the command to your own workflow when you want to refresh screenshots alongside a build.

## Choose a simulator and appearance

Use `box devices` to see available simulators. Pass a device name, and optionally choose dark appearance or a locale:

```bash theme={"system"}
box screenshot screenshots/iphone.png --device "iPhone 17 Pro" --dark --locale en_US
```

These are documented `box screenshot` options. See [Screenshot](https://docs.xenoci.com/ios/screenshot.md) for the available settings.

## Run tests across devices

For a test job that exercises several simulators, use `box test --devices`. It builds tests once and runs them on each listed simulator in turn:

```bash theme={"system"}
box test --devices "iPhone SE (3rd generation),iPhone 17 Pro Max,iPad (A16)"
```

`--devices` is supported by `box test`, not `box screenshot`. Each device's result is listed in the output. See [Test on several devices](https://docs.xenoci.com/ios/devices.md).

## Run screenshot jobs in CI

Connect GitHub using `box ci connect --personal` or `box ci connect --org`, then set the GitHub Actions job runner to `runs-on: xenoci`. Keep your screenshot command in the workflow's steps. Up to 2 CI jobs can run at once per account.

Related: [GitHub Actions](https://docs.xenoci.com/ci/github.md), [Screenshot](https://docs.xenoci.com/ios/screenshot.md), [Test on several devices](https://docs.xenoci.com/ios/devices.md), [Pricing](https://docs.xenoci.com/reference/pricing.md).

[Start with \$10 of credit, good for 1 year](https://xenoci.com/?ref=docs-app-store-screenshots-automation).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.