asc签名设置技能Skill asc-signing-setup

该技能用于使用 Apple Store Connect CLI (asc cli) 设置和轮换 iOS/macOS 应用的签名资产,包括 bundle ID、功能、证书和配置文件,适用于应用开发、发布和签名管理。关键词:asc cli, iOS签名, macOS签名, 证书管理, 配置文件, 应用发布。

移动开发 0 次安装 0 次浏览 更新于 3/13/2026

name: asc-签名设置 description: 使用 asc cli 设置 bundle ID、功能、签名证书和配置文件。在添加新应用或轮换签名资产时使用。

asc 签名设置

当您需要为 iOS/macOS 应用创建或更新签名资产时使用此技能。

前提条件

  • 已配置认证(asc auth loginASC_* 环境变量)。
  • 您知道 bundle identifier 和目标平台。
  • 您有用于证书创建的 CSR 文件。

工作流程

  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"

轮换和清理

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

注意事项

  • 始终检查 --help 获取确切的枚举值(证书类型、配置文件类型)。
  • 对于大账户使用 --paginate
  • --certificate 接受逗号分隔的 ID 当需要多个证书时。
  • 设备管理使用 asc devices 命令(需要 UDID)。