skills/mobile/ios-testing-debugging/SKILL.md
iOS testing and debugging — XcodeBuildMCP for builds/tests/LLDB, ios-simulator-mcp for simulator UI interaction/screenshots, XCTest/Swift Testing for unit tests, XCUITest for UI automation.
npx skillsauth add devjarus/coding-agent ios-testing-debuggingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Testing and debugging iOS apps using MCP servers (XcodeBuildMCP + ios-simulator-mcp), Xcode CLI tools, and test frameworks.
Two MCP servers are configured in .mcp.json for iOS development:
mcp__xcodebuild__*)The primary tool for building, testing, and debugging:
xcodebuild_build — build project/workspace for simulator or devicexcodebuild_test — run unit and UI test suitesxcodebuild_debug — attach LLDB, set breakpoints, inspect variablesmcp__ios-simulator__*)Simulator control and UI interaction:
screenshot — capture current simulator screenui_describe_all — get accessibility tree of entire screenui_tap — tap at coordinates or elementui_type — input text into focused fieldui_swipe — swipe gesturesui_describe_point — get element at coordinatesui_view — compressed screenshot as base64record_video / stop_recording — capture interaction videosinstall_app, launch_app — install and launch on simulatorxcrun simctl boot via Bash or MCPinstall_app + launch_appui_describe_all to get accessibility treeui_tap, ui_type, ui_swipe to interactscreenshot at each step for review.mdxcrun simctl shutdown allUnit tests first (TDD):
XCTAssertEqual, XCTAssertTrue, XCTAssertThrowsError@Test, #expect, #require, @SuiteUI tests for critical flows:
XCUIApplication().launch(), query by accessibility identifier.tap(), .typeText(), .swipeUp().exists, .waitForExistence(timeout:)Build and run — use XcodeBuildMCP from CLI
When MCP servers aren't available, use Bash directly:
# List simulators
xcrun simctl list devices available
# Boot and install
xcrun simctl boot "iPhone 16"
xcrun simctl install booted ./build/MyApp.app
xcrun simctl launch booted com.example.MyApp
# Screenshot
xcrun simctl io booted screenshot /tmp/screen.png
# Build and test
xcodebuild test -scheme MyApp -sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 16'
# Clean up
xcrun simctl shutdown all
testing
Multi-source research method — decompose a question, fan out parallel investigators, interleaved-think each result, verify claims adversarially, synthesize a cited answer. Use for breadth-heavy research, stack comparisons, "which approach wins" questions.
testing
Decide when to use unit vs integration vs e2e tests, and when to mock vs use the real thing per dependency. Dependency injection is the enabler — without it you end up monkey-patching imports. Apply when writing tests of any kind.
development
Test-driven development process — write failing test, implement to pass, refactor. Use when implementing any feature or fixing bugs.
development
Patterns for sharing types, API contracts, and validation schemas between frontend and backend. Use when multiple domains consume the same data shapes to prevent contract drift.