Communityコーディング&開発github.com

iOS E2E

iOSアプリをシミュレーター上でビルド、実行、分離されたGatewayとのペアリング、UI操作、スクリーンショット、ログ、クラッシュ解析、フォーカスされたテスト、エンドツーエンドの検証を行います。

iOS E2E とは?

このスキルは、iOSシミュレーター上でアプリのエンドツーエンドテストを自動化するための包括的なガイドです。開発者は、モバイルビルドMCPツールを使用してアプリをビルドし、シミュレーターにインストールして起動し、UIオートメーションコマンドで画面要素を操作できます。スクリーンショットの撮影、ログの収集、クラッシュレポートの分析もサポートしており、テストスイートの実行や変更のエンドツーエンド検証が可能です。特筆すべき点として、分離されたGatewayを使用して本番環境に影響を与えずにテストでき、`mobilebuildmcp` CLIと`simctl`コマンドを組み合わせて利用します。このスキルは、Claude CodeやCursorなどのAIエージェントがiOSアプリのQAプロセスを自動化する際に特に有用で、オンボーディングフローやシステムUIの操作など、実際の開発で直面する落とし穴にも対応しています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/.agents/skills/ios-e2e

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

iOS E2E は何をしますか?

チェックアウトルートから作業します。.mobilebuildmcp/config.yaml(セットアップ)にプロジェクト、スキーム、DerivedDataが指定されているため、mobilebuildmcpコマンドにはプロジェクトフラグは不要です。

よく使う2つの値:

  • $sim:シミュレーターのUDID(pnpm ios:sim:pair で表示されます)。すべての mobilebuildmcp 呼び出しに --simulator-id "$sim" を渡します。指定しない場合、設定のデフォルトは iPhone 17 という名前のシミュレーターを対象とします。
  • $bundle:バンドルID。署名チームによって異なります。ビルドから読み取ります:bundle=$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' apps/ios/build/DerivedData/Build/Products/Debug-iphonesimulator/OpenClaw.app/Info.plist)。

ビルドと実行

  1. ビルド:mobilebuildmcp simulator build。apps/ios/project.yml を編集した後、最初に pnpm ios:gen を実行します。

  2. simctl でインストールして起動します。起動引数を取ることができます(pnpm ios:run は引数を取りません):

    xcrun simctl install "$sim" apps/ios/build/DerivedData/Build/Products/Debug-iphonesimulator/OpenClaw.app
    xcrun simctl launch --terminate-running-process "$sim" "$bundle" --openclaw-reset-onboarding
    

    mobilebuildmcp simulator build-and-run と launch-app は、終了しないログキャプチャをアタッチします。

  3. デバッグ起動引数:grep -rhoE '"--openclaw-[a-z-]+"' apps/ios/Sources | sort -u。--openclaw-screenshot-mode に --openclaw-*-fixture フラグを追加すると、Gatewayなしでフィクスチャ画面を表示します。-AppleLanguages "(de)" -AppleLocale de_DE で別の言語で実行します。デバッグURLスキームは openclaw-debug:// です。

UIの操作

  1. mobilebuildmcp ui-automation snapshot-ui --style minimal で、タップ可能なターゲットを ref|action|role|label|value|id として一覧表示します。コントロールではないテキスト(チャットバブル、行タイトル)は --output json でのみ表示されます。
  2. refに対して tap、type-text、long-press(--duration はミリ秒)、swipe、gesture で操作します。wait-for-ui で待機します:要素の場合は --predicate exists --label '…' --role button、テキストの場合は --predicate textContains --text '…'。複数の要素にマッチする待機セレクターは失敗します。--role または --identifier を追加してください。--timeout-ms は30000未満に保ってください。デーモンは30秒後にすべてのリクエストを DAEMON_TRANSPORT_FAILED で終了します。より長く待つには待機を繰り返します。
  3. refは1つのスナップショットに属します。画面が変わるたびに新しいスナップショットを取ってください。
  4. 画面を確認する:mobilebuildmcp simulator screenshot を実行し、表示されたJPEGを読み取ります。

注意点:

  • オンボーディングやシートは背後にある画面もリストします。ラベルやIDでマッチングし、最後のマッチを取得します。
  • iPhoneではサイドバーがコンテンツの上に重なります。行をタップする前に RootTabs.Sidebar.Show をタップします。
  • xcrun simctl openurl は呼び出しごとにシステムの「OpenClawで開きますか?」アラートをキューに入れます。それぞれに対して Open または Cancel をタップします。
  • アプリのプロセス外にあるシステムUI(フォトピッカー、共有シート)はスナップショットに含まれません。MobileBuildMCPにバンドルされているAXeバイナリで座標を指定してタップします:"$(brew --prefix mobilebuildmcp)/libexec/bundled/axe" tap -x <x> -y <y> --udid "$sim"。座標はポイントです:スクリーンショットのピクセル × 画面のポイント幅 ÷ スクリーンショットの幅。

ログとクラッシュ

先に操作した後、制限された時間枠で読み取ります:

xcrun simctl spawn "$sim" log show --last 2m --style compact --predicate 'subsystem BEGINSWITH "ai.openclaw"'

クラッシュは ~/Library/Logs/DiagnosticReports/OpenClaw-*.ips に保存されます。triggered スレッドの最初の OpenClaw フレームが原因を特定します。アプリの設定とデータベースはアプリコンテナにあります(xcrun simctl get_app_container "$sim" "$bundle" data)。simctl spawn … defaults read ではそれらを参照できません。LLDBとxctrace: DEBUG.md。

テスト

  1. 影響を受けるスイートを実行します:pnpm ios:test <Suite>(セレクターと IOS_SIM:apps/ios/README.md を参照)。
  2. リグレッションテストがベースで赤になることを証明します:変更をコミットし、変更されたソースファイルのベースバージョンをチェックアウトします(git checkout <base> -- <paths>)、スイートを実行し、その後 git checkout HEAD -- <paths> を実行します。

完了条件: 影響を受けるスイートがパスし、新しい各リグレッションテストがベースで失敗します。

変更をエンドツーエンドで証明する

  1. 分離されたGateway(セットアップの1回限りのプロファイル)を長時間実行サービスとして起動します:node scripts/run-node.mjs --profile ios-sim gateway --bind loopback。これはオペレーターのGatewayや ~/.openclaw には一切影響しません。実行中は、CLIを node openclaw.mjs --profile ios-sim … として呼び出します。run-node は実行中のGatewayの下での再ビルドを拒否します。
  2. 実際のオンボーディングUIを通じて新しいシミュレーターをペアリングします:sim=$(pnpm --silent ios:sim:pair | tail -1)(別のビルドには --app、別のプロファイルには --profile を使用)。
  3. 可視コントロールを通じて変更を実行します。チャットのラウンドトリップ:chat-message-input に入力し、chat-send-message をタップし、応答にのみ含まれる単語を待ちます。
  4. ビルドを比較します:main ブランチと変更後で同じ手順を、それぞれ新しいシミュレーター上で実行し、一致するスクリーンショットを取得します。
  5. Gatewayを停止し、シミュレーターを削除します。

ノードコマンド、パーミッション、認証失敗、停止、拒否された送信、アップグレード、iPadレイアウト: PROOF.md。ここにはデバイスでしか証明できないものもリストされています。

完了条件: スクリーンショットまたは記録された出力が、変更後の動作と main での動作の欠如を示している。Gatewayのポートが閉じており、openclaw-pair-* シミュレーターが残っていない。

セットアップ

マシンごとに1回限り。各ステップの最後に確認チェックを行います。

  1. Xcode、シミュレーターランタイム、xcodegen、Watch Rustツールチェーン:apps/ios/README.md の前提条件。確認:xcrun simctl list devices available に iPhone 17 が表示される。

  2. リポジトリピンのSwiftFormatとSwiftLint:scripts/install-swift-tools.sh <PATH上のディレクトリ>。確認:scripts/check-swift-tools.sh が終了コード0で終了する。

  3. MobileBuildMCP、SentryのXcodeBuildMCP CLI:brew tap getsentry/xcodebuildmcp && brew install getsentry/xcodebuildmcp/mobilebuildmcp。これらの手順はバージョン2.7.1に対して作成されました。確認:mobilebuildmcp --version。

  4. チェックアウト:pnpm install --frozen-lockfile、続いて pnpm ios:gen(Xcodeプロジェクトは生成され、コミットされません)。次に .mobilebuildmcp/config.yaml を作成し、/.mobilebuildmcp/ を .git/info/exclude に追加します:

    schemaVersion: 1
    enabledWorkflows: [simulator, simulator-management, ui-automation, debugging]
    sentryDisabled: true
    sessionDefaults:
      projectPath: ./apps/ios/OpenClaw.xcodeproj
      scheme: OpenClaw
      configuration: Debug
      platform: iOS
      simulatorName: iPhone 17
      derivedDataPath: ./apps/ios/build/DerivedData # pnpm ios:run と共有
    

    確認:mobilebuildmcp simulator list-schemes が OpenClaw をリストし、mobilebuildmcp simulator build が成功する。

  5. ios-sim Gatewayプロファイル(Gatewayは停止状態、oc = node openclaw.mjs --profile ios-sim):oc config set gateway.mode local、oc config set gateway.port 19031、oc config set gateway.auth.mode token、oc config set gateway.auth.token "$(openssl rand -hex 24)"。チャット返信には main エージェント用のモデルが必要です:oc models auth login またはテスト認証情報で add。確認:Gatewayが起動し、pnpm ios:sim:pair がチャット画面で終了する。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

関連スキル