mcpField
A
asc-iris

asc-iris

github.com/tddworks开发581 次安装6 周前更新
代码仓库

关于 asc-iris

通过浏览器 Cookie 认证访问 App Store Connect 私有 iris API 的命令行 skill,涵盖应用查询与创建、会话检查,以及读取公共 REST API 不提供的 App Review 拒绝详情。

主要功能

  1. 01浏览器 Cookie 认证
  2. 02检查会话状态
  3. 03查询与创建应用
  4. 04读取审核拒绝详情
  5. 05下载审核附件

适用场景

  1. 01创建 App Store Connect 应用
  2. 02检查 iris 会话是否可用
  3. 03查看 App Review 拒绝消息

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/tddworks/asc-cli-skills --skill asc-iris

安装后在 Claude Code 中输入/asc-iris确认已加载。

详细介绍

asc iris — App Store Connect 私有 API

使用基于 Cookie 的身份验证访问 App Store Connect 私有 API(iris)端点。iris API 为 ASC 网页 UI 提供支持,并开放了公共 REST API 不具备的功能,例如创建 App。

身份验证

Iris 使用浏览器 Cookie,而非 JWT API 密钥。两种解析方式:

  1. 浏览器自动提取(默认)——在 Chrome/Safari/Firefox 中登录 appstoreconnect.apple.com。SweetCookieKit 会自动提取 Cookie。
  2. 环境变量——为 CI/CD 设置 ASC_IRIS_COOKIES:
    export ASC_IRIS_COOKIES="myacinfo=DAWT...; itctx=eyJ..."
    

必需的 Cookie 是 myacinfo(在 .apple.com 上设置)。其他 Cookie(itctx、dqsid、wosid)会从 appstoreconnect.apple.com 收集。

如何导航(CAEOAS 交互方式)

每个 JSON 响应都包含一个 "affordances" 字段,其中提供了可直接运行的命令:

{
  "source": "browser",
  "cookieCount": 5,
  "affordances": {
    "listApps": "asc iris apps list",
    "createApp": "asc iris apps create --name <name> --bundle-id <id> --sku <sku>"
  }
}

命令

status — 检查 iris 会话
asc iris status --pretty

输出:

{
  "data": [{
    "affordances": {
      "createApp": "asc iris apps create --name <name> --bundle-id <id> --sku <sku>",
      "listApps": "asc iris apps list"
    },
    "cookieCount": 5,
    "source": "browser"
  }]
}

如果未找到 Cookie,错误消息会建议登录 appstoreconnect.apple.com 或设置 ASC_IRIS_COOKIES。

apps list — 列出所有 App
asc iris apps list --pretty

输出:

{
  "data": [{
    "affordances": {
      "listAppInfos": "asc app-infos list --app-id 1234567890",
      "listVersions": "asc versions list --app-id 1234567890"
    },
    "bundleId": "com.example.app",
    "id": "1234567890",
    "name": "My App",
    "platforms": ["IOS"],
    "primaryLocale": "en-US",
    "sku": "MYSKU"
  }]
}
apps create — 创建新 App
asc iris apps create \
  --name "My App" \
  --bundle-id com.example.app \
  --sku com.example.app \
  [--primary-locale en-US] \
  [--platforms IOS] \
  [--version 1.0] \
  --pretty
标志必填默认值说明
--name✅—App 名称(显示在 App Store 上)
--bundle-id✅—Bundle 标识符(必须与已注册的 Bundle ID 匹配)
--sku✅—SKU 标识符(在你的账户中必须唯一)
--primary-locale❌en-US主要语言区域
--platforms❌IOS一个或多个:IOS、MAC_OS
--version❌1.0初始版本字符串

多平台示例:

asc iris apps create \
  --name "My Universal App" \
  --bundle-id com.example.universal \
  --sku com.example.universal \
  --platforms IOS MAC_OS \
  --version 2.0 \
  --pretty

重要: --bundle-id 必须引用一个已注册的 Bundle 标识符。如有需要,请先使用 asc bundle-ids register 注册。

resolution-center get — 读取 App Review 的拒绝消息

官方 API 只会报告提交内容存在 UNRESOLVED_ISSUES;审核员的消息文本和指南引用仅能通过 iris 获取。当提交内容或被拒项目显示 getResolutionDetails affordance 时,运行:

asc iris resolution-center get --submission-id <SUBMISSION_ID> --plain-text --pretty
asc iris resolution-center get --submission-id <SUBMISSION_ID> --out ./rc-attachments  # also download attachments

返回 Resolution Center 讨论串:messages[](审核员文本,fromActor 为 APPLE/USER)、rejectionReasons[](指南的 section/code/说明),以及在 App Review 附加文件时提供的 attachments[](使用 --out <dir> 下载)。完整文档:docs/features/resolution-center.md

典型工作流

# 1. Check if you're logged in
asc iris status --pretty

# 2. Create a new app
asc iris apps create \
  --name "My New App" \
  --bundle-id com.example.newapp \
  --sku com.example.newapp \
  --pretty

# 3. Continue with public API commands (use the app ID from step 2)
asc versions list --app-id <id>
asc app-infos list --app-id <id>

故障排查

“No App Store Connect cookies found”

  • 确保已在浏览器中登录 appstoreconnect.apple.com
  • 如果使用 Chrome,CLI 需要访问 Keychain 以解密 Cookie——收到提示时请授予访问权限
  • 对于 CI/CD,请使用 Cookie 字符串设置 ASC_IRIS_COOKIES

409 ENTITY_ERROR.INCLUDED.INVALID_ID

  • 创建请求中的占位符 ID 必须使用 ${local-id} 格式——CLI 会自动处理

iris apps list 返回空结果

  • 如果尚未创建任何 App,这是正常现象——使用 asc iris apps create 创建一个

评论

支持 Markdown