Skip to content
Latchkey

xcodebuild "No account for team" in CI

Xcode knows which team to sign with but has no signed-in Apple account for that team, so it cannot fetch certificates or profiles.

What this error means

The build reports No account for team "ABCDE12345". The runner has no Apple account configured and no API key to act as one.

xcodebuild
error: No account for team "ABCDE12345". Add a new account in Accounts settings or verify that your accounts have valid credentials.

Diagnose it: SDK, signing, or simulator?

Mobile CI failures cluster into three: a missing or mismatched SDK component, a code-signing identity that does not exist on the runner, or a simulator or emulator that never became ready.

Terminal
# Android
sdkmanager --list_installed 2>/dev/null | head
echo "ANDROID_HOME=$ANDROID_HOME"
adb devices

# iOS
xcodebuild -version && xcrun simctl list devices available | head
security find-identity -v -p codesigning

Common causes

No Apple account or API key on the runner

CI runners are not signed into Xcode, so any operation needing account access fails.

Automatic signing needs to talk to Apple

Automatic signing tries to reach App Store Connect for the team, which requires authentication CI does not have by default.

How to fix it

Provide an App Store Connect API key

  1. Create an API key in App Store Connect and store the .p8 and key id in CI secrets.
  2. Write the key to disk in a setup step.
  3. Pass the authentication key to xcodebuild.
shell
xcodebuild -scheme MyApp archive \
  -allowProvisioningUpdates \
  -authenticationKeyPath "${PWD}/AuthKey.p8" \
  -authenticationKeyID "${KEY_ID}" \
  -authenticationKeyIssuerID "${ISSUER_ID}"

Switch to manual signing with imported assets

Import the certificate and profile yourself and set manual signing so Xcode never needs to reach Apple during the build.

How to prevent it

  • Manage signing assets with an API key or fastlane match so no interactive Apple login is required. These steps require a macOS runner.

Frequently asked questions

What causes xcodebuild "No account for team" in CI?
There are 2 common causes: no apple account or api key on the runner and automatic signing needs to talk to apple. CI runners are not signed into Xcode, so any operation needing account access fails.
How do I fix xcodebuild "No account for team" in CI?
There are 2 fixes depending on which cause you have: provide an app store connect api key and switch to manual signing with imported assets. Work through them in order, since the first is the most common.
What does xcodebuild "No account for team" in CI actually mean?
The build reports No account for team "ABCDE12345".
How do I stop xcodebuild "No account for team" in CI happening again?
Manage signing assets with an API key or fastlane match so no interactive Apple login is required.

Related guides

References

Not every red build is your code. Latchkey repairs the ones that are not, on the runner. Start free → 30-day trial · No credit card