Provisioning profile doesn't include signing certificate "Apple Distribution: Name (LXQ....)"

Hello, I am trying to use XCode to generate a 'embedded.provisionprofile' file. My Xcode macos project keeps giving me an error saying:

Provisioning profile "BRandNewMebedded" doesn't include signing certificate "Apple Distribution: Martin Barker (LV6WXG529F)".

When I download the Provisioning Profile file "BRandNewMebedded" from online, I make sure it has "Mac App Distribution" checked, but even if i edit it to use the first option "Distribution" and re-download it, my XCode keeps saying the same error in red.

I'm going to remove this post and make it a comment in my previous post instead.

Re-downloading won't fix this one. A provisioning profile only trusts the specific certificate(s) it was generated against at the time — if the certificate got regenerated (or is new) after the profile was created, downloading the same old profile file again just gets you the same stale trust list, no matter how many times you do it.

The fix is to regenerate the profile itself, not redownload it: go to the profile in the Developer portal, open it, and hit regenerate (this re-links it to whichever certificate is currently active on your account), then download that new file. Worth confirming first which certificate is actually current with security find-identity -v -p codesigning so you know what the profile should be pointing at.

I ran into this building the CI pipeline behind macless.dev and ended up writing a free script that checks whether a cert's fingerprint actually matches what's embedded in a profile, so you can catch this before a build fails on it: github.com/jackson26-source/macless-signing-doctor.

Provisioning profile doesn't include signing certificate "Apple Distribution: Name (LXQ....)"
 
 
Q