asc-signing-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ASC Signing Setup

ASC 签名配置设置

Use this skill when you need to create or renew signing assets for iOS/macOS apps.
当你需要为iOS/macOS应用创建或更新签名资产时,可以使用此技能。

Preconditions

前置条件

  • Auth is configured (
    asc auth login
    or
    ASC_*
    env vars).
  • You know the bundle identifier and target platform.
  • You have a CSR file for certificate creation.
  • 已配置认证(
    asc auth login
    ASC_*
    环境变量)。
  • 你知晓Bundle标识符和目标平台。
  • 你拥有用于证书创建的CSR文件。

Workflow

操作流程

  1. Create or find the bundle ID:
    • asc bundle-ids list --paginate
    • asc bundle-ids create --identifier "com.example.app" --name "Example" --platform IOS
  2. Configure bundle ID capabilities:
    • asc bundle-ids capabilities list --bundle "BUNDLE_ID"
    • asc bundle-ids capabilities add --bundle "BUNDLE_ID" --capability ICLOUD
    • Add capability settings when required:
      • --settings '[{"key":"ICLOUD_VERSION","options":[{"key":"XCODE_13","enabled":true}]}]'
  3. Create a signing certificate:
    • asc certificates list --certificate-type IOS_DISTRIBUTION
    • asc certificates create --certificate-type IOS_DISTRIBUTION --csr "./cert.csr"
  4. Create a provisioning profile:
    • asc profiles create --name "AppStore Profile" --profile-type IOS_APP_STORE --bundle "BUNDLE_ID" --certificate "CERT_ID"
    • Include devices for development/ad-hoc:
      • asc profiles create --name "Dev Profile" --profile-type IOS_APP_DEVELOPMENT --bundle "BUNDLE_ID" --certificate "CERT_ID" --device "DEVICE_ID"
  5. Download the profile:
    • asc profiles download --id "PROFILE_ID" --output "./profiles/AppStore.mobileprovision"
  1. 创建或查找Bundle ID:
    • asc bundle-ids list --paginate
    • asc bundle-ids create --identifier "com.example.app" --name "Example" --platform IOS
  2. 配置Bundle ID的功能权限:
    • asc bundle-ids capabilities list --bundle "BUNDLE_ID"
    • asc bundle-ids capabilities add --bundle "BUNDLE_ID" --capability ICLOUD
    • 必要时添加功能权限设置:
      • --settings '[{"key":"ICLOUD_VERSION","options":[{"key":"XCODE_13","enabled":true}]}]'
  3. 创建签名证书:
    • asc certificates list --certificate-type IOS_DISTRIBUTION
    • asc certificates create --certificate-type IOS_DISTRIBUTION --csr "./cert.csr"
  4. 创建配置描述文件:
    • asc profiles create --name "AppStore Profile" --profile-type IOS_APP_STORE --bundle "BUNDLE_ID" --certificate "CERT_ID"
    • 针对开发/临时分发包含设备:
      • asc profiles create --name "Dev Profile" --profile-type IOS_APP_DEVELOPMENT --bundle "BUNDLE_ID" --certificate "CERT_ID" --device "DEVICE_ID"
  5. 下载配置描述文件:
    • asc profiles download --id "PROFILE_ID" --output "./profiles/AppStore.mobileprovision"

Rotation and cleanup

轮换与清理

  • Revoke old certificates:
    • asc certificates revoke --id "CERT_ID" --confirm
  • Delete old profiles:
    • asc profiles delete --id "PROFILE_ID" --confirm
  • 吊销旧证书:
    • asc certificates revoke --id "CERT_ID" --confirm
  • 删除旧配置描述文件:
    • asc profiles delete --id "PROFILE_ID" --confirm

Notes

注意事项

  • Always check
    --help
    for the exact enum values (certificate types, profile types).
  • Use
    --paginate
    for large accounts.
  • --certificate
    accepts comma-separated IDs when multiple certificates are required.
  • Device management uses
    asc devices
    commands (UDID required).
  • 始终使用
    --help
    查看确切的枚举值(证书类型、配置描述文件类型)。
  • 对于大型账号,使用
    --paginate
    参数。
  • 当需要多个证书时,
    --certificate
    接受逗号分隔的ID。
  • 设备管理使用
    asc devices
    命令(需要UDID)。