# asc background-assets

> asc background-assets commands: create Apple-hosted background asset packs, upload their files and versions, and submit them for App Store review.

Source: https://air.build/docs/cli/asc-background-assets/

`asc background-assets` manages an app's Apple-hosted background assets: the asset packs themselves, their versions, the files uploaded to each version, the release state of a version in TestFlight and on the App Store, and submitting versions for review. Picking an Apple team, output, pagination, `--confirm` and exit codes work as described on the [asc](https://air.build/docs/cli/asc/) page; the flag tables below leave out `--output`, `--pretty`, `--limit`, `--next`, `--paginate` and the `--…-fields` flags, which are explained there.

A typical flow: `create` an asset pack, `versions create` a version for it, `upload-files create` its archive and manifest, wait until the version's state is `COMPLETE` (`versions list --state COMPLETE`), then `submit` it.

## list

Lists the background assets of an app.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | App Store Connect app ID. Required, or set `ASC_APP_ID`. | — |
| `--archived` | Filter by archived state (`true`/`false`). | — |
| `--asset-pack-identifier` | Filter by asset pack identifiers, comma-separated. | — |
| `--sort` | `assetPackIdentifier`, `-assetPackIdentifier`, `createdDate`, `-createdDate`. | — |
| `--versions-locale` | Filter by uploaded version locales, comma-separated (e.g. `en-US,ja`). | — |
| `--versions-platform` | Filter by version platforms, comma-separated: `IOS`, `MAC_OS`, `TV_OS`, `VISION_OS`. | — |

```sh
asc background-assets list --app "APP_ID" --versions-platform "IOS,VISION_OS" --sort "-createdDate"
```

## view

Shows one background asset.

| Flag | What it does | Default |
| --- | --- | --- |
| `--id` | Background asset ID. Required. | — |

```sh
asc background-assets view --id "ASSET_ID"
```

## create

Creates a background asset (an asset pack) for an app.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | App Store Connect app ID. Required, or set `ASC_APP_ID`. | — |
| `--asset-pack-identifier` | The asset pack identifier. Required. | — |

```sh
asc background-assets create --app "APP_ID" --asset-pack-identifier "com.example.assetpack"
```

## update

Archives or unarchives a background asset.

| Flag | What it does | Default |
| --- | --- | --- |
| `--id` | Background asset ID. Required. | — |
| `--archived` | Set the archived state (`true`/`false`). | — |

```sh
asc background-assets update --id "ASSET_ID" --archived true
```

## versions

Versions of a background asset. Each version holds the uploaded files; its state moves through `AWAITING_UPLOAD`, `PROCESSING`, then `COMPLETE` or `FAILED`.

### versions list

Lists the versions of a background asset.

| Flag | What it does | Default |
| --- | --- | --- |
| `--background-asset-id` | Background asset ID. Required. | — |
| `--state` | Filter by state, comma-separated: `AWAITING_UPLOAD`, `PROCESSING`, `FAILED`, `COMPLETE`. | — |
| `--app-store-state` | Filter by App Store release state, comma-separated: `PREPARE_FOR_SUBMISSION`, `READY_FOR_REVIEW`, `WAITING_FOR_REVIEW`, `IN_REVIEW`, `ACCEPTED`, `REJECTED`, `PROCESSING_FOR_DISTRIBUTION`, `READY_FOR_DISTRIBUTION`, `SUPERSEDED`. | — |
| `--external-beta-state` | Filter by external beta release state, comma-separated: `READY_FOR_BETA_SUBMISSION`, `WAITING_FOR_REVIEW`, `IN_REVIEW`, `REJECTED`, `PROCESSING_FOR_TESTING`, `READY_FOR_TESTING`, `SUPERSEDED`. | — |
| `--internal-beta-state` | Filter by internal beta release state, comma-separated: `READY_FOR_TESTING`, `SUPERSEDED`. | — |
| `--locale` | Filter by locales, comma-separated (e.g. `en-US,ja`). | — |
| `--platform` | Filter by platforms, comma-separated: `IOS`, `MAC_OS`, `TV_OS`, `VISION_OS`. | — |
| `--version` | Filter by versions, comma-separated. | — |
| `--sort` | `version` or `-version`. | — |

```sh
asc background-assets versions list --background-asset-id "ASSET_ID" --platform "IOS" --state "COMPLETE" --sort "-version"
```

### versions view

Shows one background asset version.

| Flag | What it does | Default |
| --- | --- | --- |
| `--version-id` | Background asset version ID. Required. | — |

```sh
asc background-assets versions view --version-id "VERSION_ID"
```

### versions create

Creates a new version of a background asset.

| Flag | What it does | Default |
| --- | --- | --- |
| `--background-asset-id` | Background asset ID. Required. | — |

```sh
asc background-assets versions create --background-asset-id "ASSET_ID"
```

## app-store-releases

The App Store release of a background asset version.

### app-store-releases view

Shows a background asset App Store release.

| Flag | What it does | Default |
| --- | --- | --- |
| `--id` | Release ID. Required. | — |

```sh
asc background-assets app-store-releases view --id "RELEASE_ID"
```

## external-beta-releases

The external TestFlight release of a background asset version.

### external-beta-releases view

Shows a background asset external beta release.

| Flag | What it does | Default |
| --- | --- | --- |
| `--id` | Release ID. Required. | — |

```sh
asc background-assets external-beta-releases view --id "RELEASE_ID"
```

## internal-beta-releases

The internal TestFlight release of a background asset version.

### internal-beta-releases view

Shows a background asset internal beta release.

| Flag | What it does | Default |
| --- | --- | --- |
| `--id` | Release ID. Required. | — |

```sh
asc background-assets internal-beta-releases view --id "RELEASE_ID"
```

## upload-files

The files uploaded to a background asset version: the asset archive and its manifest.

### upload-files list

Lists the upload files of a background asset version.

| Flag | What it does | Default |
| --- | --- | --- |
| `--version-id` | Background asset version ID. Required. | — |

```sh
asc background-assets upload-files list --version-id "VERSION_ID"
```

### upload-files view

Shows one upload file.

| Flag | What it does | Default |
| --- | --- | --- |
| `--upload-file-id` | Background asset upload file ID. Required. | — |

```sh
asc background-assets upload-files view --upload-file-id "UPLOAD_FILE_ID"
```

### upload-files create

Creates an upload file on a version and uploads the file.

| Flag | What it does | Default |
| --- | --- | --- |
| `--version-id` | Background asset version ID. Required. | — |
| `--file` | Path to the file to upload. Required. | — |
| `--asset-type` | `ASSET` or `MANIFEST`. Required. | — |
| `--checksum` | Verify the source file's checksums before committing. | `false` |

```sh
asc background-assets upload-files create --version-id "VERSION_ID" --file "./asset.zip" --asset-type ASSET
```

### upload-files update

Updates an upload file, for example to mark its upload complete.

| Flag | What it does | Default |
| --- | --- | --- |
| `--upload-file-id` | Background asset upload file ID. Required. | — |
| `--uploaded` | Mark the upload as complete (`true`/`false`). | — |
| `--checksum` | Verify the source file's checksums before committing. | `false` |
| `--file` | Path to the file for checksum verification (needs `--checksum`). | — |

```sh
asc background-assets upload-files update --upload-file-id "UPLOAD_FILE_ID" --uploaded true --file "./asset.zip" --checksum
```

## submit

Submits background asset versions for App Store review. It creates a review submission (or uses an existing one), adds each selected version as an item and submits it, the same steps as `asc review submissions-create`, `asc review items-add` and `asc review submissions-submit` (see [asc: review and release](https://air.build/docs/cli/asc-release/)).

Pick versions with exactly one of `--all`, `--asset-pack-identifier`, `--background-asset-id` or `--version-id`. With the first three, the newest version in state `COMPLETE` is taken for each background asset; a selected background asset with no `COMPLETE` version is an error.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | App Store Connect app ID. Required, or set `ASC_APP_ID`. | — |
| `--all` | Submit the latest `COMPLETE` version of every non-archived background asset of the app. | `false` |
| `--asset-pack-identifier` | Asset pack identifiers to submit, comma-separated. | — |
| `--background-asset-id` | Background asset IDs to submit, comma-separated. | — |
| `--version-id` | Background asset version IDs to submit, comma-separated (skips the lookup). | — |
| `--platform` | `IOS`, `MAC_OS`, `TV_OS`, `VISION_OS`. | `IOS` |
| `--review-submission-id` | Add the items to this existing review submission instead of creating one. | — |
| `--no-submit` | Create the submission and add the items, but don't submit, so more items can be added. | `false` |
| `--dry-run` | Show the submission flow without changing anything. | `false` |
| `--confirm` | Confirm the submission. Required unless `--dry-run`. | `false` |

```sh
asc background-assets submit --app "APP_ID" --background-asset-id "ASSET_ID" --confirm
```
