Provisioning profile doesn't include signing certificate

After upgrading to macOS 10.13.4 and Xcode 9.3, my project now makes all my Provisioning Profile ineligible! They worked before upgrade.


The error message for the distribution profile is:

Provisioning profile "distribution profile name" doesn't include signing certificate "development certificate name"


So I search through the forum,

  • remove ALL items in keychain My Certificate
  • redownload the distribution profile (double tap to install to Xcode)
  • create new distribution profile (double tap to install to Xcode)
  • recreate the Production certificate (double tap to install to Keychain)
  • redownload the Development certificate (double tap to install to Keychain)


So now my keychain has two production certificate (one is newly created), and one development certificate, and the error is still there. I found it weird that it asked for the development certificate in distribution profile? (I think this is the clue, but I don't know why)


So now what should I do? Please help!

Post not yet marked as solved Up vote post of limtc Down vote post of limtc
219k views
  • I fixed the problem by:

    Exporting from Keychain all my Apple Developer certificates to a .p12 file.Deleting all my Apple Developer certificates.Double-clicking the exported certificates file to re-import the certificates to the keychain.

    After that, it magically started working again.

  • With Apple you are going to need magic to get things working... I am resorting to the rain dance to try get XCode to recognice my provisioning profile does indeed include the necessary signing certificate.

  • I had the same issue - "provisioning profile does not contain the signing certificate" - and the above info led to the solution: I was busy exporting the existing certificates to .p12 when I noticed one had expired. Deleting that one from the key chain did the trick - the app then validated correctly with auto signing, finding the right certificates on its own.

Add a Comment

Replies

I see in your SO thread you set from auto signing to manual - in some cases, temporarily toggling auto on/off/on helps to clear things up.


Restart Xcode, confirm your contracts are all current...I think a new one in iTC just dropped, so be sure to pay it attention.

Post not yet marked as solved Up vote reply of KMT Down vote reply of KMT

Your SO technique worked for me: https://stackoverflow.com/questions/49643253/provisioning-profile-doesnt-include-signing-certificate-xcode-9-3

re-starting Xcode can possibly resolve above issue;
  • This helped me.

  • What a dysfunctional product Xcode is? All these stupid certificates, Cocoapods, releases at a lightning speed causing with no new functions, absolute crap...

  • Thank you, it is good advice.

Manual drag and drop .cer file to keychain => login list did help me. https://stackoverflow.com/questions/5401088/key-chain-warning-the-system-roots-keychain-cannot-be-modified

I ran into this on Xcode 13 building and exporting a Mac app as Developer ID. At first I had the issue "You haven't been given access to cloud-managed distribution certificates" and that led to a Stack Overflow question that said I had to get my Team Agent to give me access to cloud-managed Developer ID certificates in App Store Connect. I did that and then got this error - the provisioning profile that Xcode generated for the app during export didn't include my Developer ID certificate in my keychain.

What eventually fixed it was deleting the Developer ID certificate out of my keychain. Then Xcode used the cloud-managed certificate that was in the provisioning profile that it generated.

I would advise exporting the Developer ID certificate before trying this, though, in case you need it back for some reason.

  • Thanks Mr. Jefferson! I ran into this problem uploading a Developer ID app to Apple for notarization. This happened on my new MacBook Pro, which I had imported my Xcode Developer Profile from my previous computer. It included the Developer ID Application and Developer ID Installer.

    Apparently to use the Cloud-Managed Developer ID certificate, I needed to remove both the manual Developer ID Application and Developer ID Installer. After that, it worked spotlessly.

    Thank you!

  • yup, this is what also worked for me. many thanks!

  • Fixed my problem too. Thanks.

Xcode/Preferences/ManageCertificates/+/“add one by one, total 5”

Add a Comment

I am resorting to the rain dance to try get XCode to recognice my provisioning profile does indeed include the necessary signing certificate.

Is this a Mac app that you’re trying to export with Developer ID signing?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I am having the same issue. With an annoying loop of Team requirement not being fulfilled.

It occurs in a loop where i’ll manage to get the signing certificate working, but the team requirement doesn’t. Get the team fulfilled, then the signing certificate is not with the provisioning profile….

This is ongoing and i cannot solve it. I cannot build my app because of this. I am giving up. They took my money and i’m offered broken tools. nice…….

1 more way to try for those manual sign, in my case , I strictly aim for "Distribution" only, so what you can try here:

  1. open your ../your-prj.xcodeproj/project.pbxproj using VSCODE (or any text/code editor).
  2. manually search for following and forcefully change all of them to what you want , there will be multiple group of following (in my case , Debug-free and Release-free group)

however most likely all you need to care about is Release only, if you are trying to archive or *.ipa

search following and change them

				CODE_SIGN_IDENTITY = "Apple Distribution";
				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Distribution";
...
...

				PROVISIONING_PROFILE_SPECIFIER = dist-askt;
				"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = dist-askt;

dist-askt is the profile name I've created in developer.apple.com,

  1. go back to XCODE, simply click around here and there to refresh ,
  • OR choose (read from DISK) if any warning prompted you the project have updated outside of XCODE
  • OR simply kill restart XCODE