You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Design: ASC API key support for unattended real-device runner signing #4961
On a macOS host with no interactive Xcode sign-in session, xcodebuild -allowProvisioningUpdates cannot resolve automatic provisioning for the real-device runner build. The build fails, and the CLI passes no credential source beyond that flag.
Today the working paths are:
sign in to Xcode once on that host, so a session persists for xcodebuild, or
set AGENT_DEVICE_IOS_SIGNING_IDENTITY and AGENT_DEVICE_IOS_PROVISIONING_PROFILE for manual signing, after fetching a profile by hand.
Where the gap is real
A host signed in to Xcode at least once keeps a working session, so this is not a blocker for a normal developer Mac. The gap is hard only where no interactive sign-in can happen or persist:
CI or headless device-farm Macs provisioned without an Apple ID session
unattended renewal after a profile expires or a device re-registers
Proposal
Extend the Apple runner setup env family (AGENT_DEVICE_IOS_TEAM_ID, AGENT_DEVICE_IOS_SIGNING_IDENTITY, AGENT_DEVICE_IOS_PROVISIONING_PROFILE) with an App Store Connect API key trio:
AGENT_DEVICE_IOS_AUTH_KEY_PATH
AGENT_DEVICE_IOS_AUTH_KEY_ID
AGENT_DEVICE_IOS_AUTH_KEY_ISSUER_ID
When a real-device build runs with -allowProvisioningUpdates and all three are set, pass -authenticationKeyPath, -authenticationKeyID, and -authenticationKeyIssuerID to xcodebuild. When any of the three is unset, keep today's behavior. This is build-time configuration like the rest of the family: no CLI flag and no command-surface change.
Document it with the family: a row in the configuration table's "Apple runner setup" entry, a bullet in the runner setup steps, and a typed failure reason (for example signing_auth_key_incomplete when the trio is partially set, instead of build_failed_unclassified).
Validation so far
Hand-tested locally on 2026-11-13: the trio unblocked a real-device runner build on a host with no Xcode sign-in, and automatic provisioning resolved without a GUI session. I keep a patch against the then-current runner-artifact.ts and can turn it into a PR if the direction looks right.
Following the accepted-in-direction call on this issue, PR #5042 has been updated (head 70086c316): the four review must-fixes are in — key path pre-validation with the typed signing_auth_key_invalid_path reason, stream scrubbing that keeps chunk-split matches scrubbed while leaving flag names and key ids in the logs, sanitized argv on every error surface (including the spawn cause's spawnargs), and the key variables stripped from the child environment — plus red-team contract tests and mutation checks, all green.
Real-device evidence (2026-11-24, iPhone 12 Pro Max / iOS 18.1, Xcode 27.2, no Apple ID signed in) is summarized in the PR body: an automatic-signing runner build with the trio present builds, installs, and serves a snapshot on the device, and every runner.log invocation echo shows the key path scrubbed to [redacted]. One honest limit is recorded there too: this test host still holds valid local profiles from the 2026-11-13 hand test, so it cannot demonstrate the key flipping build success — that remains covered by the hand test recorded in this issue.
Shipped in ae0c794 (#5042): AGENT_DEVICE_IOS_AUTH_KEY_PATH / AGENT_DEVICE_IOS_AUTH_KEY_ID / AGENT_DEVICE_IOS_AUTH_KEY_ISSUER_ID as an all-three-or-none set give -allowProvisioningUpdates an App Store Connect API key on hosts with no Xcode sign-in. A partial set and an unreadable key path fail the build before it starts (signing_auth_key_incomplete, signing_auth_key_invalid_path), and the help and docs pages cover the headless setup. Closing.
Activity
feat(apple-runner): pass App Store Connect API key args for unattende…
thymikee commentedon Nov 23, 2026
Decision: accepted in direction.
Please send the patch as a PR.
signing_auth_key_incompletereason.@strzhao your existing patch covers this scope, so please submit it as a PR against current
mainif you would like to carry it forward.strzhao commentedon Nov 24, 2026
Following the accepted-in-direction call on this issue, PR #5042 has been updated (head
70086c316): the four review must-fixes are in — key path pre-validation with the typedsigning_auth_key_invalid_pathreason, stream scrubbing that keeps chunk-split matches scrubbed while leaving flag names and key ids in the logs, sanitized argv on every error surface (including the spawn cause'sspawnargs), and the key variables stripped from the child environment — plus red-team contract tests and mutation checks, all green.Real-device evidence (2026-11-24, iPhone 12 Pro Max / iOS 18.1, Xcode 27.2, no Apple ID signed in) is summarized in the PR body: an automatic-signing runner build with the trio present builds, installs, and serves a snapshot on the device, and every runner.log invocation echo shows the key path scrubbed to
[redacted]. One honest limit is recorded there too: this test host still holds valid local profiles from the 2026-11-13 hand test, so it cannot demonstrate the key flipping build success — that remains covered by the hand test recorded in this issue.feat(apple-runner): pass App Store Connect API key args for unattende…
feat(apple-runner): pass App Store Connect API key args for unattende…
strzhao commentedon Nov 30, 2026
Shipped in ae0c794 (#5042):
AGENT_DEVICE_IOS_AUTH_KEY_PATH/AGENT_DEVICE_IOS_AUTH_KEY_ID/AGENT_DEVICE_IOS_AUTH_KEY_ISSUER_IDas an all-three-or-none set give-allowProvisioningUpdatesan App Store Connect API key on hosts with no Xcode sign-in. A partial set and an unreadable key path fail the build before it starts (signing_auth_key_incomplete,signing_auth_key_invalid_path), and the help and docs pages cover the headless setup. Closing.