mcpField
A
asc-iris

asc-iris

github.com/tddworks開発581 回インストール6 週間前に更新
リポジトリ

asc-iris について

ブラウザー Cookie 認証で App Store Connect の非公開 iris API にアクセスするコマンドラインスキルです。アプリの一覧・作成、セッション確認、公開 REST API では取得できない審査却下の詳細取得を扱います。

主な機能

  1. 01ブラウザー Cookie 認証
  2. 02セッション状態の確認
  3. 03アプリの一覧と作成
  4. 04審査却下の詳細取得
  5. 05審査添付ファイルのダウンロード

活用シーン

  1. 01App Store Connect アプリの作成
  2. 02iris セッションの利用可否確認
  3. 03App 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 では利用できない機能を提供します。

認証

Iris では JWT API キーではなく、ブラウザー Cookieを使用します。Cookie の取得方法は次の 2 つです。

  1. ブラウザーからの自動抽出(デフォルト) — Chrome/Safari/Firefox で appstoreconnect.apple.com にログインします。Cookie は SweetCookieKit によって自動的に抽出されます。
  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 — すべてのアプリを一覧表示する
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 — 新しいアプリを作成する
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 Store に表示されます)
--bundle-id✅—バンドル識別子(登録済みのバンドル ID と一致する必要があります)
--sku✅—SKU 識別子(アカウント内で一意である必要があります)
--primary-locale❌en-USプライマリロケール
--platforms❌IOS1 つ以上: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 には、すでに登録されているバンドル識別子を指定する必要があります。必要に応じて、先に asc bundle-ids register で登録してください。

resolution-center get — App Review の却下メッセージを読む

公式 API では、提出物に UNRESOLVED_ISSUES があることしか報告されません。審査担当者のメッセージ本文やガイドラインの引用を取得できるのは iris のみです。提出物または却下された項目に getResolutionDetails アフォーダンスが表示されたら、次を実行します。

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>

トラブルシューティング

「App Store Connect の Cookie が見つかりません」

  • ブラウザーで appstoreconnect.apple.com にログインしていることを確認してください
  • Chrome を使用している場合、CLI が Cookie を復号するには Keychain へのアクセスが必要です。アクセスを求められたら許可してください
  • CI/CD では、Cookie 文字列を指定して ASC_IRIS_COOKIES を設定してください

409 ENTITY_ERROR.INCLUDED.INVALID_ID

  • 作成リクエスト内のプレースホルダー ID には ${local-id} 形式を使用する必要があります。これは CLI によって自動的に処理されます

iris apps list の結果が空

  • まだアプリが作成されていない場合は正常です。asc iris apps create で作成してください

コメント