xcode-build_skill

This skill builds, runs, and tests iOS/macOS apps using xcodebuild and xcrun simctl, enabling streamlined simulator management and UI automation.

117

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill pzep1/xcode-build-skill --skill xcode-build

  • CLI_REFERENCE.md11.4 KB
  • SKILL.md5.8 KB
  • XCUITEST_GUIDE.md12.6 KB

Overview

This skill provides direct command-line workflows for building and running iOS and macOS apps using xcodebuild and xcrun simctl. It replaces MCP-based tooling by using native Xcode CLI commands for building, installing, launching, testing, capturing logs, and managing simulators. The focus is on predictable, scriptable automation suitable for CI and local development.

How this skill works

The skill invokes xcodebuild to discover schemes, show build settings, compile targets, and run tests. It uses xcrun simctl to list, boot, shutdown, install apps to, launch apps on, and capture screenshots from simulators. Log capture is handled with the system log utility, and UI interactions are implemented via XCUITest test code run through xcodebuild. Environment variables store session configuration for repeatable scripts.

When to use it

  • Building iOS or macOS projects from CI or scripts
  • Running apps on iOS Simulator instances for development or testing
  • Managing simulator lifecycle: list, boot, shutdown, or boot multiple devices
  • Running unit or UI tests using xcodebuild test and XCUITest
  • Capturing simulator screenshots, streams, or app logs for debugging or reports
  • Automating app installs, launches, and interactions without MCP servers

Best practices

  • Prefer explicit workspace/project, scheme, destination, and derivedDataPath flags to avoid ambiguous builds
  • Query simulators as JSON (xcrun simctl list devices --json) for reliable UDID selection
  • Boot simulators before install/launch and gracefully shutdown when done to avoid state leaks
  • Use XCUITest for UI interactions rather than low-level event injection; keep tests idempotent
  • Stream logs with /usr/bin/log and capture the PID so you can stop logging reliably
  • Store common paths and UDIDs in environment variables or a small config file for repeatable CI runs

Example use cases

  • CI pipeline: run xcodebuild with -derivedDataPath, run tests on a booted simulator, and collect artifacts
  • Local dev: build for simulator, install the .app, take screenshots, and iterate on UI changes
  • Automated QA: run XCUITest suites via xcodebuild -only-testing to target specific tests
  • Debugging: stream app logs while interacting with a simulator launched via simctl
  • Device farm scripts: enumerate available simulators, boot a specific iPhone model, install and launch multiple builds concurrently

FAQ

Yes. xcodebuild and xcrun are provided by Xcode and its command-line tools. Ensure the appropriate Xcode is selected with xcode-select if you have multiple versions.

How do I pick the right simulator UDID?

Use xcrun simctl list devices --json and filter by name and availability. Store the returned UDID in an environment variable to reuse in commands.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational