Build and test an iOS app from Linux with Claude Code (no Mac on your desk)
Disclosure: box is our product (IDEALAB), it is paid. Pricing is at the end, and every terminal block below is output box printed for a real run, copied from our docs. This is a step-by-step walkthrough: from a Linux sh
Disclosure: box is our product (IDEALAB), it is paid. Pricing is at the end, and every terminal block below is output box printed for a real run, copied from our docs.
This is a step-by-step walkthrough: from a Linux shell with Claude Code and no Xcode, to a SwiftUI app that has been built, tested and screenshotted on a real Mac. The app is Shelf, a small reading tracker we use as our example project. It has a Library tab, a Settings tab and a few unit tests.
By the end, Claude Code can do three things on its own: compile the app, run the tests, and look at the screen.
What you need
- Linux (x86_64), or WSL on Windows
- Claude Code
- A GitHub account, used to sign in
- An iOS project. Shelf is plain SwiftUI with an XcodeGen
project.yml, five Swift files and one test file
Step 1: Install the CLI
With Node:
npm i -g --prefix ~/.local @xenoci/box
Without Node:
curl -fsSL https://xenoci.com/install.sh | sh
It prints the version and where it put the binary:
box 0.1.46 installed at ~/.local/bin/box (API https://xenoci.com/api)
Step 2: box login
box login
A sign-in page opens with the code your terminal shows. Press Continue with GitHub and approve on GitHub's own page. box reads your email address only and gets no access to your repositories. Then the terminal carries on by itself and prints the account it signed in as. box status shows your balance at any time.
Your first sign-in with a GitHub account adds $10 of credit.
Step 3: Give Claude Code the box tools
box is also an MCP server. Register it with Claude Code once:
claude mcp add box -- box mcp
(box setup does this for you, and also installs a short skill and a box section in ~/.claude/CLAUDE.md so the agent knows when to use it. Either works.)
Now Claude Code has tools called build, test, screenshot, run, debug and a few more. Each one runs as a job on a real Mac and returns text: the log, the test counts, the path of the picture.
Step 4: Ask Claude to build
Open Claude Code in the project folder (the one with project.yml or the .xcodeproj) and say something like:
Build this app with box. If it does not compile, fix it and build again.
Under the hood that is box build. box uploads only files that changed, respects .gitignore, never sends .env, and streams one line per step. Here is a first build of a small public example app, exactly as printed:
box: upload: 40 files checked, 37 new (48 KB), .gitignore respected, .env never sent (snapshot snap_U6yR_XryxDkXiZRz)
box: queue: job bj_7-3bV-glUcpaJYOu (build, ios, $0.05/min) submitted
box: status: running
box: machine: source unpacked
box: cache: first build of this project on its disk, so everything is built once
box: build: xcodebuild build
box: build: done in 9s
box: status: succeeded
box: results: saved to ./.box/out/bj_7-3bV-glUcpaJYOu/ (build.log, list.json)
box: bj_7-3bV-glUcpaJYOu succeeded, 60s billed, $0.05
If the build fails, each compile error comes back as file:line:col with your local path and the lines around it, and box exits with 1. That is what makes the loop work for an agent: it opens the file it already has, fixes the line, and runs the build again. The Mac keeps the project's build between jobs, so the next build only compiles what changed.
Step 5: Ask Claude to run the tests
Shelf's tests check the reading stats:
final class ReadingStatsTests: XCTestCase {
func testWeeklyTotalCountsLastSevenDays() {
let stats = ReadingStats(minutesByDay: [5, 10, 20, 20, 25, 30, 15, 40], dailyGoal: 20)
XCTAssertEqual(stats.weeklyTotal, 160)
}
func testStreakCountsDaysThatMetTheGoal() {
let stats = ReadingStats(minutesByDay: [10, 20, 25, 20], dailyGoal: 20)
XCTAssertEqual(stats.streak, 3)
}
func testStreakIsZeroWhenTodayMissedTheGoal() {
let stats = ReadingStats(minutesByDay: [30, 30, 5], dailyGoal: 20)
XCTAssertEqual(stats.streak, 0)
}
}
The prompt:
Run the tests with box and take a screenshot after they pass.
That becomes box test --screenshot out.png. The tests and the picture run in one job, so it is one Mac job instead of two. This is the run for Shelf:
box: test: running the tests on the simulator
box: status: succeeded
box: results: saved to ./.box/out/bj_HrUdpDTTNUz5Sfy0/ (destinations.txt, screen.png, test-summary.json, test.log, test.xcresult.zip)
box: tests 3 passed, 0 failed
box: bj_HrUdpDTTNUz5Sfy0 succeeded, 60s billed, $0.05
And this is out.png, what the iPhone simulator showed right after the three tests passed:
When a test fails, box prints the count, then each failing test with its assertion message, and exits with 1. Here is a failing run from a small demo app:
box: tests 1 passed, 1 failed
FAIL BoxDemoTests/testCountStartsAtOne(): XCTAssertEqual failed: ("0") is not equal to ("1") - the counter should start at 1
box: bj_aDxtZUJUe0bpuoFx failed, 180s billed, $0.15
The agent reads that line the same way it would read a local test failure.
Step 6: Ask Claude to look at the screen
"Tests pass" and "the screen looks right" are different claims. For the second one:
Take a screenshot of the first screen with box and tell me what you see.
That is box screenshot shot.png. For Shelf it printed:
box: queue: job bj_PIZNBlT6EAHfjB83 (screenshot, ios, $0.05/min) submitted
box: build: done in 3s
box: status: succeeded
box: bj_PIZNBlT6EAHfjB83 succeeded, 120s billed, $0.10
Claude Code can read the PNG, so it can check the things a unit test will not catch: a progress bar that never fills, a title cut off, a list that is empty. Useful flags: --dark for dark mode, --locale ja (or ko_KR, ar) for another language, --device "iPhone 17 Pro" for another simulator, and --record to also save a video from launch to the picture.
Going further
Past the first screen, box run keeps the app open on a simulator, and box ui lets the agent tap, type and swipe to reach other screens, such as Shelf's Settings tab:
box debug --break File.swift:42 launches the app under LLDB and prints the stack and variables at the breakpoint, as text the agent can read.
Exit codes the agent can trust
-
0ok -
1the build or tests failed: fix the code and run again -
2bad usage or a local problem -
3box's side or the account: do not retry in a loop, tell the user
Pricing
$0.05 per started minute of build and test time; $10 credit on first GitHub sign-in, good for a year. Upload, time in the queue and machine start-up are not billed, and a job that fails because of us costs nothing.
What does not work yet
- Windows without WSL
- Picking an Xcode or iOS version
- Physical iPhones (simulators only)
Setup and the full docs: https://docs.xenoci.com/?ref=devto-blitz
If you try this on your own app, tell me where Claude still got stuck. That is the list I am working through.
Apple, Mac, macOS, iPhone, Xcode, Swift and SwiftUI are trademarks of Apple Inc., registered in the U.S. and other countries and regions. box is an independent service and is not affiliated with, sponsored or endorsed by Apple Inc.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.

