Skip to content
Latchkey

Xcode "requires a provisioning profile" in CI

Xcode is doing a build that must be signed for a real device, but the target has no provisioning profile to sign with. On CI no profile exists unless you import one.

What this error means

An archive or device build fails with "<target> requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor." Simulator builds usually do not hit this; archive/export builds do.

xcodebuild output
error: App requires a provisioning profile. Select a provisioning profile
in the Signing & Capabilities editor.
(in target 'App' from project 'App')

Common causes

A device/archive build with no profile present

Archiving for the App Store or a device needs a .mobileprovision for that bundle id installed on the runner. A clean runner has none.

Signing required for a build that should be unsigned

A simulator or test build that does not need a real identity still asks for a profile because signing was left enabled.

How to fix it

Skip signing for simulator/test builds

If the job only runs on the simulator, disable signing so no profile is needed.

Terminal
xcodebuild test -scheme App -destination 'platform=iOS Simulator,name=iPhone 16' \
  CODE_SIGNING_ALLOWED=NO

Import a profile and sign manually for device builds

Decode the profile from a secret, install it, and point the build at it with manual signing.

Terminal
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp App.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
xcodebuild archive -scheme App CODE_SIGN_STYLE=Manual \
  PROVISIONING_PROFILE_SPECIFIER="App Distribution" DEVELOPMENT_TEAM=ABCDE12345

How to prevent it

  • Use CODE_SIGNING_ALLOWED=NO for simulator and test jobs.
  • Manage device-build profiles with fastlane match or a secured keychain step.
  • Keep bundle identifiers aligned with the profiles you import.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →