Skip to content

Can Xcode builds, tests and simulators run for a project user without a GUI login?

Answered 2026-10-08: yes, with conditions. Decided 2026-10-12: 1A and 2A. The decisions and their reasons are in the I20I20 (closed): X06-guest-xcode: Guest users and XcodeCan builds and simulators run for a guest user without a GUI login? comment that starts Decision (2026-10-12):, which sets two conditions on 2A. Decision 1 is in S06-04-vms-and-placementS06-04-vms-and-placement: VMs and PlacementThe work VM and the isolated VM, Xcode in them, and which VM a project's sessions run in., and the spec work for decision 2 is I196I196 (open): Simulators leave the session: per-user launchd domain and the Seatbelt profileFrom the X06-guest-xcode result (#20), for S13-guest-confinement layers 1 and 2.. Source: X06-guest-xcodeX06-guest-xcode: Guest users and XcodeCan builds and simulators run for a guest user without a GUI login? (I20I20 (closed): X06-guest-xcode: Guest users and XcodeCan builds and simulators run for a guest user without a GUI login?). Changes S13-01-process-hardeningS13-01-process-hardening: Layer 1: Process Hardening (v1)How wb-guestd hardens every process it starts for a project user, and how it stops and kills a project user's processes., S13-02-filesystem-profileS13-02-filesystem-profile: Layer 2: Seatbelt Filesystem Profile (v1)The Seatbelt profile each session's process tree runs under, where it comes from, its exceptions for Xcode builds, and its known gaps., S07-17-approvals-and-learningS07-17-approvals-and-learning: Approvals and LearningHow an unknown destination reaches the user as an approval request, what an approval grants, and how learn mode collects names. (“Leftover processes”), S06-04-vms-and-placementS06-04-vms-and-placement: VMs and PlacementThe work VM and the isolated VM, Xcode in them, and which VM a project's sessions run in. and X00-indexX00-index: SpikesThe open questions that must be answered by a throwaway prototype before work builds on them, in the order they are taken up.. Follow-ups: I194I194 (closed): Xcode image variant: getting Xcode and simulator runtimes into the imageFrom the X06-guest-xcode result (#20). (getting Xcode and the runtimes into the image), I195I195 (open): macOS app tests need a console session: decide the isolated-VM fallbackFrom the X06-guest-xcode result (#20). (a console session for macOS app tests), I196I196 (open): Simulators leave the session: per-user launchd domain and the Seatbelt profileFrom the X06-guest-xcode result (#20), for S13-guest-confinement layers 1 and 2. (simulators, the per-user launchd domain and the profile). I224I224 (closed): S06-vm-lifecycle: which process explains the testmanagerd failure in the guest (B20 decision 1A)S06-vm-lifecycle, "No GUI login session" (B20-guest-xcode decision 1A, #20, PR #221) says wb replaces the testmanagerd error from xcodebuild with a message that names the v1 limit (NFR06-explained-refusals). later changed decision 1’s error message: the guest instructions explain the limit, and no host process rewrites the error.

guest (untrusted)wb-guestdrootsession + Seatbelt profilexcodebuild, swift: yessimctl, iOS tests: yestests: broad profile onlysimulator serviceslaunchd, user domainGUI sessionnone: macOS tests failoutside the profile

Figure 1. A session runs as the project user under its profile. Builds and simulators work, and iOS tests on the simulator finished only under the broad simulator profile. The simulator’s services run in launchd’s per-user domain, outside the session and its profile. Every xcodebuild test on macOS and launching a macOS app need a GUI session, which a project user doesn’t have (X06-guest-xcodeX06-guest-xcode: Guest users and XcodeCan builds and simulators run for a guest user without a GUI login?).

Decision 1: macOS tests through xcodebuild in v1?

Section titled “Decision 1: macOS tests through xcodebuild in v1?”

Nothing tells wb-hostd before a session that it will run one, so there is nothing to refuse it on. The limit is documented, and wb turns the testmanagerd error into an explained message that names it. Builds, SwiftPM and signing work in either VM under the Layer 2 profiles as specified. Simulators and iOS tests work only with option 2A below, outside those profiles.

The isolated VM logs one project user in at its screen. I195I195 (open): macOS app tests need a console session: decide the isolated-VM fallbackFrom the X06-guest-xcode result (#20). designs and measures it.

The simulator can’t be confined by the session’s profile, and xcodebuild test on it needed a profile that allows nearly everything. As specified now, no Layer 2 profile in S13-guest-confinementS13-guest-confinement: Guest ConfinementControls inside the guest that narrow what a project user's processes can do, and tell the host which program opened each connection. runs simulators: under the base and build profiles simctl can’t reach CoreSimulatorService, so simulators and iOS tests don’t run in a confined session. Option A would change that. I196I196 (open): Simulators leave the session: per-user launchd domain and the Seatbelt profileFrom the X06-guest-xcode result (#20), for S13-guest-confinement layers 1 and 2. holds the follow-up.

A. A simulator profile, stated as unconfined

Section titled “A. A simulator profile, stated as unconfined”

Only a project that declares simulators gets a simulator profile: the build profile plus the simulator runtime mounts, CoreSimulator’s and CoreDevice’s services, power management, distributed notifications, the GPU user clients, pidinfo with procargs, and the broad allow xcodebuild test needed (X06-guest-xcodeX06-guest-xcode: Guest users and XcodeCan builds and simulators run for a guest user without a GUI login?, “Option 2A”). Its sessions have no file system confinement from Layer 2. The declaration is a host-side project setting that wb sets, never read from .wraithbox/, even with config_trust.

Bisect further, and confine simulator services some other way.

RequirementRecommended (1A, 2A)Alternatives
FR06-native-toolsFR06-native-tools: Native guest toolsAgent tool calls run tools native to the guest operating system (on macOS guests: Homebrew packages, Xcode command line tools, optionally full Xcode). native tools, optionally full Xcodeall but macOS tests through xcodebuild and app launches1B: all, once I195I195 (open): macOS app tests need a console session: decide the isolated-VM fallbackFrom the X06-guest-xcode result (#20). works
SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another. one project user per projectkept by Unix permissions; simulators are per usersame
SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential. no secrets in the guestno login password needed1B: depends on the login design
NFR05-two-macos-vmsNFR05-two-macos-vms: Platform limitmacOS permits at most two concurrently running macOS guests per host. two macOS guests at mostno GUI work forces the isolated VM1B: macOS tests hold the isolated VM

FR06-native-toolsFR06-native-tools: Native guest toolsAgent tool calls run tools native to the guest operating system (on macOS guests: Homebrew packages, Xcode command line tools, optionally full Xcode). for Xcode projects, the Xcode image variant (I194I194 (closed): Xcode image variant: getting Xcode and simulator runtimes into the imageFrom the X06-guest-xcode result (#20).), and the guest confinement work of S13-guest-confinementS13-guest-confinement: Guest ConfinementControls inside the guest that narrow what a project user's processes can do, and tell the host which program opened each connection. (I196I196 (open): Simulators leave the session: per-user launchd domain and the Seatbelt profileFrom the X06-guest-xcode result (#20), for S13-guest-confinement layers 1 and 2.). I43I43 (closed): S06-vm-lifecycle: VM slot admission for image builds, updates and GUI work (NFR05-two-macos-vms)NFR05-two-macos-vms allows two running macOS guests per host, and S06-vm-lifecycle uses both: the work VM and the isolated VM. (VM slots) no longer needs room for GUI work beyond macOS app tests.

Details and glossary

Why simulators work but macOS tests don’t. The simulator’s services are started by launchd in the user’s own background domain, which exists for any user that runs a process. The macOS test daemon is only allowed in a logged-in screen session, and macOS launches the app under test into that session too. A project user never has one.

Why the profile can’t hold the simulator. A Seatbelt profile applies to a process and its children. The simulator’s processes are started by launchd, not by the session, so they never get it.