xcode-dev-loop

Builds, tests, and inspects Xcode projects from the command line using xcodebuild and simctl.

3|Updated Nov 8, 2014
One-click install
npx skills add https://github.com/mintuz/.dotfiles --skill xcode-dev-loop-mintuz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xcode-dev-loop
Source: https://github.com/mintuz/.dotfiles/tree/main/agents/.agents/skills/xcode-dev-loop
Command: npx skills add https://github.com/mintuz/.dotfiles --skill xcode-dev-loop-mintuz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Running Xcode builds and tests from the command line is error-prone: long builds hit command timeouts, Swift Testing output differs from XCTest, and simulator names collide. This Skill provides the canonical discover-build-test-launch-screenshot loop so every run produces a trustworthy verdict. ## Core Features & Use Cases - Background Build and Test Execution: Runs xcodebuild in the background with log and status files so long builds never die at the command timeout. - Correct Result Reading: Distinguishes Swift Testing output from XCTest, greps terminal markers, and reads xcresult bundles for structured failure reasons. - Simulator Install, Launch, and Screenshots: Boots pinned simulator UDIDs, installs the exact build product, launches by bundle id, and captures numbered screenshots for visual verification. - Use Case: After writing Swift tests, run the full suite against a pinned iOS simulator in the background, read the xcresult bundle on failure, then install the app and capture screenshots of key screens to verify the change visually. ## Quick Start Build and test my Xcode workspace on an iOS simulator in the background, then install the app and take a screenshot of the main screen.

Frequently Asked Questions about xcode-dev-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run xcodebuild tests from the command line?

Run xcodebuild test with the workspace or project flag and an explicit scheme, since the test action fails without one. Pin the destination as platform=iOS Simulator,id=<udid> and run it in the background with output redirected to a log file to avoid command timeouts.

How to read Swift Testing results from xcodebuild output?

Swift Testing does not emit XCTest's Test Case passed lines. Look for the checkmark line 'Test run with N tests in M suites passed' plus TEST SUCCEEDED, and confirm N is greater than zero, since an empty XCTest summary proves nothing.

Why does xcodebuild fail when the result bundle path exists?

xcodebuild fails when the -resultBundlePath already exists, so give every attempt its own unique path. On failure, read the bundle with xcrun xcresulttool get test-results summary for the structured crash reason.

Can I use a simulator name instead of a UDID with simctl?

No, duplicate simulator names like iPhone 17 Pro Max cause 'No booted simulator named' failures. List devices with xcrun simctl list devices available -j, resolve the UDID once, and reuse it for boot, install, launch, and screenshot commands.

Why does xcodebuild test hang or time out in CI?

Clean builds and test runs routinely exceed a 600 second foreground timeout, leaving no verdict when killed. Start the run in the background, redirect output to a log, record the exit status to a status file, and wait on that file instead of a foreground sleep.

When should I not use test-without-building in xcodebuild?

test-without-building reuses the previously built product, so it can report success that excludes your latest source change. Rebuild with a full xcodebuild test run before trusting a pass.