# asc app-setup

> asc app-setup commands: set up a newly created app record in one go, with app info, categories, availability, price and localizations.

Source: https://air.build/docs/cli/asc-app-setup/

`asc app-setup` is for the steps after an app record is created (with `asc web apps create`, see [asc: web session commands](https://air.build/docs/cli/asc-web/)): app attributes and app info localizations, categories, availability, the price and the first localizations. Each command does the same as its counterpart under `asc apps`, `asc categories`, [asc pricing](https://air.build/docs/cli/asc-pricing/) or [asc localizations](https://air.build/docs/cli/asc-localizations/), grouped for setup. 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.

Notes that apply to the whole page:

- A flag marked "Required" is checked before any request; leaving it out exits `2`. Wherever `--app` is required, `ASC_APP_ID` can stand in for it.
- Territories accept a two- or three-letter code or the exact English name (`US`, `USA`, `United States`).
- Most apps have one app info record. When an app has more than one, the commands that take `--app-info` skip records already replaced by newer info, then pick the one being prepared for submission; if that still leaves more than one, they stop and list the candidates. Pass `--app-info` to choose.

```sh
asc app-setup info set --app "1234567890" --primary-locale "en-US" --name "My App" --subtitle "Plan your day"
asc app-setup categories set --app "1234567890" --primary PRODUCTIVITY
asc app-setup pricing set --app "1234567890" --free --base-territory "USA"
```

| Subcommand | What it does |
| --- | --- |
| [info](https://air.build/docs/cli/asc-app-setup/#info) | Update app info and app info localizations. |
| [categories](https://air.build/docs/cli/asc-app-setup/#categories) | Set categories for an app. |
| [availability](https://air.build/docs/cli/asc-app-setup/#availability) | Edit app availability. |
| [pricing](https://air.build/docs/cli/asc-app-setup/#pricing) | Set app pricing. |
| [localizations](https://air.build/docs/cli/asc-app-setup/#localizations) | Upload app store localizations. |

## info

The app's own attributes (bundle ID, primary locale, content rights) and the per-language app info: name, subtitle and privacy links.

| Subcommand | What it does |
| --- | --- |
| [`info set`](https://air.build/docs/cli/asc-app-setup/#info-set) | Set app attributes and app info localizations. |

### info set

Changes app attributes, one language's app info localization, or both in one command. Prints `appId`, plus `app` when an attribute changed and `appInfoLocalization` when the localization changed.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | The app ID (or `ASC_APP_ID`). Required. | — |
| `--bundle-id` | Sets the app's bundle ID. | — |
| `--primary-locale` | Sets the app's primary locale, such as `en-US`. | — |
| `--content-rights` | Sets the content rights declaration: `DOES_NOT_USE_THIRD_PARTY_CONTENT` or `USES_THIRD_PARTY_CONTENT`. | — |
| `--locale` | The language of the app info localization to set. | `--primary-locale` |
| `--name` | Localized app name. | — |
| `--subtitle` | Localized app subtitle. | — |
| `--privacy-policy-url` | Localized privacy policy URL. | — |
| `--privacy-choices-url` | Localized privacy choices URL. | — |
| `--privacy-policy-text` | Localized privacy policy text. | — |
| `--app-info` | The app info ID to use, when the app has more than one. It must belong to `--app`. | — |

Notes:

- Give at least one of the attribute or localization flags; with none, the command refuses with `provide at least one update flag`.
- The localization flags (`--name`, `--subtitle` and the privacy flags) need a language: `--locale`, or `--primary-locale`, which it falls back to. The localization for that language is created if it doesn't exist yet, and updated if it does. Use `--locale` to set a language's app info without changing the app; `--primary-locale` also changes the app's primary locale.
- A name or subtitle longer than App Store Connect allows is refused before any request.

```sh
asc app-setup info set --app "1234567890" --locale "en-US" --name "My App" --privacy-policy-url "https://example.com/privacy"
```

## categories

The app's primary and secondary App Store categories.

| Subcommand | What it does |
| --- | --- |
| [`categories set`](https://air.build/docs/cli/asc-app-setup/#categories-set) | Set primary and secondary categories for an app. |

### categories set

Sets the app's categories and prints the updated app info. `asc categories list` lists category IDs, and `asc categories subcategories --category-id GAMES` lists the subcategories of one (see [categories](https://air.build/docs/cli/asc-apps/#categories)).

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | The app ID (or `ASC_APP_ID`). Required. | — |
| `--primary` | Primary category ID, such as `GAMES`. Required. | — |
| `--primary-subcategory-one` | First primary subcategory, such as `GAMES_ACTION`. | — |
| `--primary-subcategory-two` | Second primary subcategory, such as `GAMES_SIMULATION`. | — |
| `--secondary` | Secondary category ID. | — |
| `--secondary-subcategory-one` | First secondary subcategory. | — |
| `--secondary-subcategory-two` | Second secondary subcategory. | — |
| `--app-info` | The app info ID to use, when the app has more than one; `--app` is needed as well. | — |

```sh
asc app-setup categories set --app "1234567890" --primary GAMES --primary-subcategory-one GAMES_ACTION --secondary ENTERTAINMENT
```

## availability

In which territories the app is on sale.

| Subcommand | What it does |
| --- | --- |
| [`availability edit`](https://air.build/docs/cli/asc-app-setup/#availability-edit) | Edit app availability for territories. |

### availability edit

Makes the app available or unavailable in the given territories, then reads the result back. Progress such as `Updated 2 territories; 0 already matched; verified 2 updated territories.` goes to stderr, and the app's availability is printed. Same as `asc pricing availability edit` (see [asc pricing](https://air.build/docs/cli/asc-pricing/#availability-edit)).

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | The app ID (or `ASC_APP_ID`). Required. | — |
| `--available` | `true` or `false`: the availability to set. Required. | — |
| `--territory` | Territories to change, comma-separated. | — |
| `--all-territories` | Changes every territory instead of a `--territory` list. | `false` |
| `--available-in-new-territories` | `true` or `false`: only checks the app's current setting for new territories, and fails if it differs. | — |

Notes:

- Give `--territory` or `--all-territories`; with both, `--all-territories` wins.
- It only updates an existing availability record. A new app has none until one is created with `asc pricing availability create`; if Apple refuses that, use `asc web apps availability create` or set Pricing and Availability in App Store Connect.
- Apple offers no way to change whether the app becomes available in new territories, which is why `--available-in-new-territories` only checks it.

```sh
asc app-setup availability edit --app "1234567890" --territory "USA,GBR" --available true
```

## pricing

The app's price.

| Subcommand | What it does |
| --- | --- |
| [`pricing set`](https://air.build/docs/cli/asc-app-setup/#pricing-set) | Set app pricing. |

### pricing set

Sets the app's price from a start date and prints the new price schedule. Like `asc pricing schedule create` (see [asc pricing](https://air.build/docs/cli/asc-pricing/#schedule-create)), it replaces the app's whole price schedule: scheduled price changes and manual prices in other territories are dropped.

| Flag | What it does | Default |
| --- | --- | --- |
| `--app` | The app ID (or `ASC_APP_ID`). Required. | — |
| `--price-point` | An app price point ID, from `asc pricing price-points`. | — |
| `--tier` | A tier number, from `asc pricing tiers`. | — |
| `--price` | A customer price, such as `0.99`; picks the price point with that price. | — |
| `--free` | Makes the app free. | `false` |
| `--base-territory` | The territory the price is set in; other territories follow from it. | the current base territory |
| `--start-date` | When the price starts (`YYYY-MM-DD`), today or later. | today, US Pacific time |
| `--refresh` | Fetches the tiers again instead of using the saved list (`--tier` and `--price`). | `false` |

Notes:

- Give exactly one of `--price-point`, `--tier`, `--price` or `--free`.
- `--tier` and `--price` need `--base-territory`. With `--price-point` or `--free` it can be left out: the base territory of the app's current price schedule is used, and a new app without one needs `--base-territory`.
- Without `--start-date`, today's date in US Pacific time (the date App Store Connect uses) is chosen and printed on stderr.

```sh
asc app-setup pricing set --app "1234567890" --price "0.99" --base-territory "USA"
```

## localizations

The App Store text of each language, read from `.strings` files.

| Subcommand | What it does |
| --- | --- |
| [`localizations upload`](https://air.build/docs/cli/asc-app-setup/#localizations-upload) | Upload localizations from .strings files. |

### localizations upload

Reads the `.strings` file at `--path`, or the files in that directory, and writes their values to the version localizations (`--type version`) or app info localizations (`--type app-info`), creating the languages that don't exist yet (for `app-info`, a new language needs a `name`; without one the command stops before any change). Same as `asc localizations upload` (see [asc localizations](https://air.build/docs/cli/asc-localizations/#upload)).

Prints `type`, the version or app and app info IDs, `dryRun`, `inputPath`, `total`, `succeeded`, `failed` and a `results` entry per language with its `action` and `status`. It exits non-zero if any language failed. When any language fails, it also writes the failures to `.asc/reports/localizations-upload/failures-N.json` under the current folder and adds `failureArtifactPath`, or `failureArtifactError` if that file can't be written.

| Flag | What it does | Default |
| --- | --- | --- |
| `--path` | A `.strings` file or a directory of them. Required. | — |
| `--type` | `version` or `app-info`. | `version` |
| `--version` | The App Store version ID. Required with `--type version`. | — |
| `--app` | The app ID (or `ASC_APP_ID`). Required with `--type app-info`. | — |
| `--app-info` | The app info ID to use with `--type app-info`, when the app has more than one. | — |
| `--locale` | Only these languages, comma-separated. | — |
| `--dry-run` | Reads the files and the current localizations and reports what would change, without changing anything. | `false` |

```sh
asc app-setup localizations upload --version "VERSION_ID" --path "./localizations" --dry-run
```
