xcode unable to find app store provisioning profile in command line build

Hi, I am trying to make my app build on GitHub Action CI pipeline. App builds fine on xcode on my mac. For CI I am using command line xcode.

I am getting following error:

No profiles for 'com.snslocation.electricians-now' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.snslocation.electricians-now'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'myapp' from project 'myapp')

You can see full log of the build here:

https://github.com/nbulatovi/ElectriciansNow/actions/runs/12603115423/job/35127512689

The provisioning profile is present, and verified in the previous steps in the pipeline, however xcode refuses to find it. If I add -allowProvisioningUpdates error stays. I tried manually mapping app id to profile name.

Is there a way to get any debug log from xcode profile search, to see why is it not picking up the correct profile? Or can you maybe help in some other way?

xcode version is 15.4, iOS SDK 17.5

This usually isn't actually about the profile being missing, it's about Xcode's headless build not looking at it the way you'd expect. Two things to check:

The profile has to be installed under its UUID filename, not its display name. Run security cms -D -i YourProfile.mobileprovision | plutil -extract UUID xml1 -o - - to get the real UUID, then confirm the file at ~/Library/MobileDevice/Provisioning Profiles/<that-UUID>.mobileprovision actually exists on the runner. A file named after the profile's display name gets silently ignored. "Automatic signing is disabled and unable to generate a profile" is the telling part. If your target's CODE_SIGN_STYLE is set to Manual, -allowProvisioningUpdates won't help since that flag only kicks in for automatic signing, and automatic signing in CI needs an App Store Connect API key passed via -authenticationKeyPath/-authenticationKeyIssuerID/-authenticationKeyID, not just having the file sitting there. If you want manual signing (the normal CI setup), skip -allowProvisioningUpdates entirely and pass CODE_SIGN_STYLE=Manual PROVISIONING_PROFILE_SPECIFIER="Your Profile Name" CODE_SIGN_IDENTITY="Apple Distribution: ..." directly on the xcodebuild command line, or set them in your export options plist.

Full disclosure, I build a CI pipeline for exactly this (macless.dev) and hit this same error building it. I also put together a free script that decodes a profile/cert pair and tells you if they actually match before you burn a CI run finding out: github.com/jackson26-source/macless-signing-doctor.

xcode unable to find app store provisioning profile in command line build
 
 
Q