No signing certificate matching with a private key was found.

Trying to submit an update to my app to the app store, my certificates were expired. so I deleted all the certificates and provisioning profiles from https://developer.apple.com/account/ios/certificate/ and from the Keychain and deleted provisioning profiles from "~/Library/MobileDevice/Provisioning Profiles" and option-clicked Product → Clean Build Folder, and started process from the beginning, but new problem arises (see title of post).


Here is what I did:

  1. In https://developer.apple.com/account/ios/certificate/ clicked Certificates then selected "iOS, tvOS, watchOS" from the combo lisstbox.
  2. Clicked [+] on top right corner.
  3. Clicked the "App Store and Ad Hoc" radio button.
  4. Clicked Continnue
  5. Launhed Keychain App
  6. Keychain Access → Certificate Assistant → Request a Certificate from Certificate Authority...
  7. User email same as my Apple ID, Common Name my first and last name.
  8. Click the "Saved to disk" radio button, Continue and saved the "CertificateSigningRequest.certSigningRequest" file to Downloads folder.
  9. Back to https://developer.apple.com/account/ios/certificate/ clicked continue.
  10. Clicked choose file... and selected "CertificateSigningRequest.certSigningRequest" and clicked Continue.
  11. On the "Your certificate is ready." page I clicked Download to download the "ios_distribution.cer" file to the Downloads folder and clicked done.
  12. Double clicked "ios_distribution.cer" file which opened up in Keychain Access and confirmed it was addedd successfuly.
    Certificate appears as:
    🔽iPhone Distribution: My Name (UKF99V45DM)
    🔑My Name
    kind: private key, RSA, 2,048-bit
    usage: any
  13. Back to https://developer.apple.com/account/ios/certificate/ clicked on Provisioning Profiles
  14. Clicked [+] on top right corner.
  15. Clicked "Distribution - App Store" radio button, then clicked Continue.
  16. Chose the App ID (that I'm working on), then clicked continue.
  17. Clicked the iOS Distribution certificate radio button, then continue.
  18. For profile name I wrote: "My app name Provisioning Profile", then clicked continue.
  19. Then clicked the download button to download the "My_app_name_Provisioning_Profile.mobileprovision" file.
  20. Back to Xcode, opened up the app project file.
  21. In the Project - Targets window, I clicked the "Automatically manage signing" checkbox, selected my team name, then unckecked the "Automatically manage signing" checkbox.
  22. For Signing for Debug and Release, I did the same:
  23. Provision Profile → Import Profile... and selected the "My_app_name_Provisioning_Profile.mobileprovision" file from step 19.
  24. But now for both the provision profile status in Xcode is: Provisioning profile "My App Name Provisioning Profile" doesn't include signing certificate "iPhone Developer: My Name (XUM88H55M8)".


Even though I double check that in Keychain Access the certificate is in there with a key.


Any help would greatly be appreciated.

I would place screenshots here but this forum desn't seem to permit inserting screenshots.


Thank you.

Accepted Reply

This thread has been deleted

Xcode 9.4.1 does not require 'option' to 'Clean Build Folder'. I'm confused why you used it, unless it's just an artifact in your head from conflating outdated troubleshooting with current tools, which speaks more about your predicament than this tread so far evidences, casting doubt on #1 ~ #24. If in fact you were required to use option, then you're not using Xcode 9.4.1...


>Manually code sign I understood was the recommended way.


Recommended by whom?


Apple recommends auto, unless you have a very specific reason for manual.


If you haven't already see: https://developer.apple.com/support/code-signing/

Replies

>and option-clicked Product → Clean Build Folder


Wait...what? Which version Xcode are you using?


#21....you should have then turned it back on (recommend process in these cases is on/off/on), followed by a CBF.


But if off was your intent, why? Why do you need to manually code sign?


#22 - Another why? This has no bearing on store builds - smacks of shotgunning your efforts, which risks digging yet a deeper hole. Don't do that. Never do anything without reason and that you don't understand the outcome of.


You may want to strip personal info by editing your question, BTW - how-to for that, and about screenshots, see For Best Results - Read the Label