$npx -y skills add rorkai/app-store-connect-cli-skills --skill asc-signing-setupSet up bundle IDs, capabilities, signing certificates, provisioning profiles, and encrypted signing sync with the asc cli. Use when onboarding a new app, rotating signing assets, or sharing them across a team.
| 1 | # asc signing setup |
| 2 | |
| 3 | Use this skill when you need to create or renew signing assets for iOS/macOS apps. |
| 4 | |
| 5 | ## Preconditions |
| 6 | - Auth is configured (`asc auth login` or `ASC_*` env vars). |
| 7 | - You know the bundle identifier and target platform. |
| 8 | - You have a CSR file for certificate creation, or you will let `asc certificates create --generate-csr` create one. |
| 9 | |
| 10 | ## Workflow |
| 11 | 1. Create or find the bundle ID: |
| 12 | - `asc bundle-ids list --paginate` |
| 13 | - `asc bundle-ids create --identifier "com.example.app" --name "Example" --platform IOS` |
| 14 | 2. Configure bundle ID capabilities: |
| 15 | - `asc bundle-ids capabilities list --bundle "BUNDLE_ID"` |
| 16 | - `asc bundle-ids capabilities add --bundle "BUNDLE_ID" --capability ICLOUD` |
| 17 | - Add capability settings when required: |
| 18 | - `--settings '[{"key":"ICLOUD_VERSION","options":[{"key":"XCODE_13","enabled":true}]}]'` |
| 19 | 3. Create a signing certificate: |
| 20 | - `asc certificates list --certificate-type IOS_DISTRIBUTION` |
| 21 | - `asc certificates create --certificate-type IOS_DISTRIBUTION --csr "./cert.csr"` |
| 22 | - Or generate a key and CSR inline: |
| 23 | - `asc certificates create --certificate-type IOS_DISTRIBUTION --generate-csr --key-out "./signing/dist.key" --csr-out "./signing/dist.csr"` |
| 24 | 4. Create a provisioning profile: |
| 25 | - `asc profiles create --name "AppStore Profile" --profile-type IOS_APP_STORE --bundle "BUNDLE_ID" --certificate "CERT_ID"` |
| 26 | - Include devices for development/ad-hoc: |
| 27 | - `asc profiles create --name "Dev Profile" --profile-type IOS_APP_DEVELOPMENT --bundle "BUNDLE_ID" --certificate "CERT_ID" --device "DEVICE_ID"` |
| 28 | 5. Download the profile: |
| 29 | - `asc profiles download --id "PROFILE_ID" --output "./profiles/AppStore.mobileprovision"` |
| 30 | 6. Inspect and install the downloaded profile locally when needed: |
| 31 | - `asc profiles inspect --path "./profiles/AppStore.mobileprovision" --output table` |
| 32 | - `asc profiles inspect --path "./profiles/AppStore.mobileprovision" --entitlements --output markdown` |
| 33 | - `asc profiles local install --path "./profiles/AppStore.mobileprovision"` |
| 34 | - `asc profiles local list --output table` |
| 35 | |
| 36 | ## Rotation and cleanup |
| 37 | - Revoke old certificates: |
| 38 | - `asc certificates revoke --id "CERT_ID" --confirm` |
| 39 | - Audit remote provisioning profiles before deleting or rotating: |
| 40 | - `asc profiles list --profile-state ACTIVE,INVALID --paginate --output json` |
| 41 | - Apple `profileState` is not a complete expiration signal: some profiles can have a past `expirationDate` while still reporting `ACTIVE`. For true expired-profile audits, compare `expirationDate` against the current date instead of relying only on `INVALID`. |
| 42 | - Delete old profiles: |
| 43 | - `asc profiles delete --id "PROFILE_ID" --confirm` |
| 44 | - Clean local Xcode provisioning profiles: |
| 45 | - `asc profiles local clean --expired --dry-run` |
| 46 | - `asc profiles local clean --expired --confirm` |
| 47 | |
| 48 | ## Shared team storage with `asc signing sync` |
| 49 | Use this when you want a lightweight, non-interactive alternative to fastlane match for encrypted git-backed certificate/profile storage. |
| 50 | |
| 51 | ```bash |
| 52 | # Push current ASC signing assets into an encrypted git repo |
| 53 | asc signing sync push \ |
| 54 | --bundle-id "com.example.app" \ |
| 55 | --profile-type IOS_APP_STORE \ |
| 56 | --repo "git@github.com:team/certs.git" \ |
| 57 | --password "$MATCH_PASSWORD" |
| 58 | |
| 59 | # Pull and decrypt them into a local directory |
| 60 | asc signing sync pull \ |
| 61 | --repo "git@github.com:team/certs.git" \ |
| 62 | --password "$MATCH_PASSWORD" \ |
| 63 | --output-dir "./signing" |
| 64 | ``` |
| 65 | |
| 66 | Notes: |
| 67 | - `--password` falls back to `ASC_MATCH_PASSWORD`. |
| 68 | - The encrypted repo follows a familiar match-style git layout for certs and profiles. |
| 69 | - `pull` writes files to disk; keychain import or profile installation is a separate step. |
| 70 | |
| 71 | ## Notes |
| 72 | - Always check `--help` for the exact enum values (certificate types, profile types). |
| 73 | - Use `--paginate` for large accounts. |
| 74 | - `--certificate` accepts comma-separated IDs when multiple certificates are required. |
| 75 | - Device management uses `asc devices` commands (UDID required). |
| 76 | - `asc profiles inspect` and `asc profiles local ...` operate on local disk state, not App Store Connect API resources. |