Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Certificates won't show in code signing identity in build settings

I'm encountering the errors:

No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found.

and:

CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'

XCode isn't giving me any option other than "Automatic iOS Developer and Distribution" options in the 'Code Signing' area of the 'Build Settings'.

I've tried changing the bundle id to match the certificates exactly, as well as a more generic com.domain.appname ID, I've deleted and recreated the provisioning profiles - I'm really lost, it feels like it should be something really simply but I can't get my certificates to show in the settings.

Screenshot of problem

like image 715
Toby Avatar asked Jun 30 '13 08:06

Toby


2 Answers

I was shocked when having the same problem and reading some answers here, too complicated. But I solved this much much simpler.

  • Open Keychain Access. Delete iPhone Developer and iPhone Distribution certificates, although they are still valid.

  • Open Apple Developer Centre. Download iOS Development and iOS Distribution certificates again. Yes, I download them again as they are written as XXXX-1.cer

  • Drag them to Keychain Access to reimport them.

  • Rerun XCode. Problem solved.

like image 125
letmeknow Avatar answered Oct 07 '22 08:10

letmeknow


The first thing I would check is that your Cert in Keychain Access is present and is married up to your private key. If it's listed but your private key isn't paired with it you've likely changed your Mac's password recently and instead of pressing "Update Keychain" you may have clicked on "New Keychain". This will require performing the CSR process again and adding that new cert from the portal to the existing prov profiles. (A screenshot here may help).

Next I would make sure that XCode's Organizer is showing your provisioning profiles as valid with a green checkmark. If they aren't valid XCode will tell you why. This could be anything from the missing private key to your cert wasn't added to the profile in the dev portal. (Another screenshot here may help).

If all of that looks good restart XCode. I've had problems with XCode not properly importing prov profiles until I give it a swift kick in the pants via restart.

like image 22
Dan Avatar answered Oct 07 '22 10:10

Dan