Skip to main content
mobster xcode hook adds a post-action to your Xcode scheme. After each simulator build, from Xcode or xcodebuild, Mobster runs the checks of the app you built on that build, in the background. The verdict comes as a macOS notification. Xcode never waits for it.

Run checks after every build

From the folder with your .xcodeproj or .xcworkspace:
  • The scheme has to be shared (Product › Scheme › Manage Schemes › Shared), so its file is in xcshareddata.
  • Mobster writes the scheme the way Xcode does, so your diff is the post-action’s 19 lines. mobster xcode unhook takes them out, and the file is as it was.
  • --tag smoke runs only the checks tagged smoke. --sim "iPhone 17 Pro" runs them on that simulator instead of each check’s own.

What runs after a build

After the build, Xcode runs mobster-agent xcode after-build --background:
  1. It reads the build from Xcode’s settings (BUILT_PRODUCTS_DIR, FULL_PRODUCT_NAME, PLATFORM_NAME). A build for a device is skipped.
  2. It picks the checks whose app is the one you built, by bundle ID, and points them at that build.
  3. It returns at once, and the checks run in the background. A newer build stops the run an older build started.
  4. The verdict comes as a notification, such as “3 passed”. The log is in .mobster/xcode/last.log, the verdict in .mobster/xcode/last.json, and the full report in .mobster/test-results/.
Launch-only checks make no model call. A check that passed before replays its recorded steps with no model. A heal, or a step that types text a model writes, still calls one (Replay and heals).

Use Mobster from Xcode’s agents

Xcode’s Claude Agent and Codex read their MCP servers from ~/Library/Developer/Xcode/CodingAssistant, not from ~/.claude.json or ~/.codex. One command writes Mobster into those files:
  • It keeps every other server and setting in both files, copies the old file to <file>.mobster-backup, and changes nothing when you run it again. --remove takes only Mobster out.
  • Add --with-skill to put the Mobster skill in the Claude Agent’s skills folder.
  • On a real iPhone, Mobster for Mac needs you signed in, as everywhere else.

Use Xcode’s tools and Mobster together

Agents outside Xcode, such as Claude Code and Codex, reach Xcode through xcrun mcpbridge. One command adds it beside Mobster:
That runs claude mcp add --scope user --transport stdio xcode -- xcrun mcpbridge and codex mcp add xcode -- xcrun mcpbridge, the commands Apple documents. It needs Xcode 26.3 or later, and it leaves an existing xcode entry alone when that entry runs something else. Then:
  1. In Xcode, choose Xcode › Settings › Intelligence and turn on “Allow external agents to use Xcode tools” under Model Context Protocol. Mobster never changes this setting.
  2. Open your project in Xcode. xcrun mcpbridge connects to the running Xcode and exits with no running Xcode processes found when there is none.
  3. Ask the agent: “I changed checkout. Build the app and prove checkout still works on a simulator.” The agent builds with Xcode’s tools and passes the .app to the Mobster tool verify_start. It drives the simulator and answers with the verdict and its frames.
Xcode’s tools build, test and render previews. The Mobster tools run the built app on a simulator or your iPhone and check saved assertions. No model grades the outcome.