Provisioning profile doesn't include signing certificate (Xcode 9.3)

XcodeProvisioning ProfileIos Provisioning

Xcode Problem Overview


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 a clue but I don't know why and what to do.)

So now what should I do? Please help!

Xcode Solutions


Solution 1 - Xcode

I got two options for you:

  1. open KeyChain and find the signing certificate that shown in the error message then delete it.

  2. you specified the signing certificate in the Build Setting->Signing, so go to the Build Setting->Signing and click the Code Signing Identity. Do not select Automatic (iOS Developer or iOS Distribution), select the one of the signing certificates in the Identities in Keychain which is valid and have associated with the Provisioning Profile.

Solution 2 - Xcode

I temporary solved the issue by going into Build Settings, and manually set Code Signing Identity (the old way). "Automatically manage signing" no longer work properly, but at least it work.

Solution 3 - Xcode

For XCode 11 and later make sure to update the profile certificate updated with "For use in Xcode 11 or later" which resolves the issue for me.

enter image description here

Solution 4 - Xcode

"Automatically manage signing" is not working on Xcode 9.3. Code signing identify should be selected manually in Build Settings.

It is right. You can select Code Signing Identity as iOS developer for development and iOS distribution for production in Signing of build settings.

Solution 5 - Xcode

check out screenshot it says it all...

Targets>>Build settings>>(search)Product bundle identifier>>this was wrong for me :(

Targets>>Build settings>>(search)Product bundle identifier>>

Solution 6 - Xcode

You need to make sure that:

  1. Your Apple Development -> Certificates, Identities & Profiles all have the correct provisioning profile "distribution profile name" that include signing certificate as in fig 1. below
  2. Same inside xCode

fig 1. enter image description here

Solution 7 - Xcode

"Automatically manage signing" is not working on Xcode 9.3. Code signing identify should be selected manually in Build Settings.

Solution 8 - Xcode

In my case, the Provisioning Profile on developer.apple.com listed two developer certificates. One was selected, and one was not. Changed it so both were selected, saved that, installed the updated profile and that fixed it.

Solution 9 - Xcode

I had to juggle a bit more too. I deleted my keychain, enabled and disabled autosigning before recreating my certificates.

Then I toggled the certificates in Build Settings section and finally I was able to select the correct certificates in general section.

Really missing the simplicity of signing for Android.. :P

Solution 10 - Xcode

In my case, I changed the Provisioning Profile to solve the problem by changing the Certificate whose type is "iOS Distribution" to another Certificate whose type is "(Distribution) For use in Xcode 11 or later", then download it and import it to keyChain, select it form Xcode.

Solution 11 - Xcode

In my case I had multiple profiles and various certs. I had to go to Apple developer and edit the profile from the error, and add every cert to it, and then it worked.

Solution 12 - Xcode

If you have this certificate on another machine, you can export it from keychain and import on the other.

My problem was that I didn't know how to match private keys with certificates because I used "all items" filter in KeyChain.

If you switch to Certificates private keys are arranged under certificates, so you can easily export the right pair.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionLim Thye CheanView Question on Stackoverflow
Solution 1 - XcodeDavid DingView Answer on Stackoverflow
Solution 2 - XcodeLim Thye CheanView Answer on Stackoverflow
Solution 3 - XcodeDinesh NagarajanView Answer on Stackoverflow
Solution 4 - XcodeAndreas BraunView Answer on Stackoverflow
Solution 5 - XcodeAbhishekView Answer on Stackoverflow
Solution 6 - XcodeTaras GlebView Answer on Stackoverflow
Solution 7 - XcodeAndreas BraunView Answer on Stackoverflow
Solution 8 - XcodestevexView Answer on Stackoverflow
Solution 9 - XcodeRuuhkisView Answer on Stackoverflow
Solution 10 - XcodeKexi HeView Answer on Stackoverflow
Solution 11 - XcodeSara Inés CalderónView Answer on Stackoverflow
Solution 12 - XcodeDanSkeelView Answer on Stackoverflow