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 unhooktakes them out, and the file is as it was. --tag smokeruns only the checks taggedsmoke.--sim "iPhone 17 Pro"runs them on that simulator instead of each check’s own.
What runs after a build
After the build, Xcode runsmobster-agent xcode after-build --background:
- It reads the build from Xcode’s settings (
BUILT_PRODUCTS_DIR,FULL_PRODUCT_NAME,PLATFORM_NAME). A build for a device is skipped. - It picks the checks whose app is the one you built, by bundle ID, and points them at that build.
- It returns at once, and the checks run in the background. A newer build stops the run an older build started.
- 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/.
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.--removetakes only Mobster out. - Add
--with-skillto put the Mobster skill in the Claude Agent’sskillsfolder. - 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 throughxcrun mcpbridge. One command adds it beside Mobster:
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:
- 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.
- Open your project in Xcode.
xcrun mcpbridgeconnects to the running Xcode and exits withno running Xcode processes foundwhen there is none. - 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
.appto the Mobster toolverify_start. It drives the simulator and answers with the verdict and its frames.