# asc profiles

> asc profiles commands: list, create, download, inspect and delete provisioning profiles, and read their bundle ID, certificates and devices.

Source: https://air.build/docs/cli/asc-profiles/

`asc profiles` manages provisioning profiles in the connected Apple team's Developer Portal account. 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` / `--…-fields` flags, which are explained there.

Builds signed by AirBuild don't need these commands: [runbuild](https://air.build/docs/cli/runbuild/) `--sign` (and Install on Device) issues, renews and embeds the profiles each bundle signs with, including after a capability, App Group or iCloud change. Use `asc profiles` only for a profile outside AirBuild's builds. A profile AirBuild issued that you delete is issued again at the next signed build.

## list

List provisioning profiles.

`--stale-only` reads every page and keeps only profiles that are `INVALID` or past their expiration date. The JSON keeps Apple's shape, but drops `meta` and paging links, and it cannot be combined with `--next`. `--include-stale` adds a Stale column to table and Markdown output. With `--fields`, both need `profileState` and `expirationDate`.

| Flag | What it does | Default |
| --- | --- | --- |
| `--id` | Filter by profile ID(s), comma-separated. | — |
| `--include` | Include related resources: bundleId, certificates, devices. | — |
| `--include-stale` | Add a Stale column to table or markdown output (not supported with JSON). | `false` |
| `--limit-certificates` | Maximum included certificates (1-50). | `0` |
| `--limit-devices` | Maximum included devices (1-50). | `0` |
| `--name` | Filter by profile name(s), comma-separated. | — |
| `--profile-state` | Filter by profile state(s): ACTIVE, INVALID. | `ACTIVE,INVALID` |
| `--profile-type` | Filter by profile type(s), comma-separated. | — |
| `--sort` | Sort by: name, -name, profileType, -profileType, profileState, -profileState, id, -id. | — |
| `--stale-only` | Read every page and show only expired or invalid profiles (computed view). | `false` |

```sh
asc profiles list
```

## view

View a profile by ID.

| Flag | What it does | Default |
| --- | --- | --- |
| `--id` | Profile ID. Required. | — |
| `--include` | Include related resources: bundleId, certificates, devices. | — |

```sh
asc profiles view --id "PROFILE_ID"
```

## links

View profile relationship linkages.

Relationship linkages of a profile: IDs only.

### links bundle-id

Get bundle ID relationship for a profile.

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

```sh
asc profiles links bundle-id --id "PROFILE_ID"
```

### links certificates

Get certificate relationship linkages for a profile.

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

```sh
asc profiles links certificates --id "PROFILE_ID"
```

### links devices

Get device relationship linkages for a profile.

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

```sh
asc profiles links devices --id "PROFILE_ID"
```

## create

Create a provisioning profile.

| Flag | What it does | Default |
| --- | --- | --- |
| `--bundle` | Bundle ID. Required. | — |
| `--certificate` | Certificate ID(s), comma-separated. Required. | — |
| `--device` | Device ID(s), comma-separated (optional). | — |
| `--name` | Profile name. Required. | — |
| `--profile-type` | Profile type (e.g., IOS_APP_DEVELOPMENT). Required. | — |

```sh
asc profiles create --name "Profile" --profile-type IOS_APP_DEVELOPMENT --bundle "BUNDLE_ID" --certificate "CERT_ID"
```

## delete

Delete a provisioning profile.

| Flag | What it does | Default |
| --- | --- | --- |
| `--confirm` | Confirm deletion. Required. | `false` |
| `--id` | Profile ID. Required. | — |

```sh
asc profiles delete --id "PROFILE_ID" --confirm
```

## download

Download a provisioning profile.

Here `--output` is the file to write, and `--output-format` picks how the metadata is printed.

| Flag | What it does | Default |
| --- | --- | --- |
| `--id` | Profile ID. Required. | — |
| `--output` | Output .mobileprovision or .provisionprofile file path. Required. | — |
| `--output-format` | Output format for metadata: json (default), table, markdown. | `json` |

```sh
asc profiles download --id "PROFILE_ID" --output "./profile.mobileprovision"
```

## inspect

Inspect a local provisioning profile.

Reads a local profile file and prints its identifiers, dates, certificate fingerprints, devices and entitlements. Nothing is sent to Apple.

| Flag | What it does | Default |
| --- | --- | --- |
| `--entitlements` | Include entitlement key/value rows in table or markdown output. | `false` |
| `--path` | Path to a .mobileprovision or .provisionprofile file to inspect. Required. | — |

```sh
asc profiles inspect --path "./profile.mobileprovision"
```
