317

I'm pulling my hair out over this. I just downloaded the iPhone 3.0 SDK, but now I can't get my provisioning profiles to work. Here is what I have tried:

  • Delete all provisioning profiles
  • Delete login keychain
  • Create new "login" keychain, make it default
  • Create a new certificate signing request
  • Create new developer and distribution certificates in the Apple developer center
  • Download and install them
  • Download the WWDR certificate and install it
  • Create a new provisioning profile and double click it to install

All the certificates report as valid, but Xcode still won't recognize them. What should I try next?

Edit:

I completely re-installed Mac OS X and from a fresh install installed the 3.0 SDK and still have the same problem.

James Webster
  • 31,873
  • 11
  • 70
  • 114
  • I just spent an hour with this exact same issue helping a friend. Finally we just gave up with the thought of filing some kind of issue with the ADC website. Sounds like they screwed something up. – Lounges Jun 16 '09 at 06:13
  • I am having the same exact problem. I was going to post a question. The certificate is valid, the correct keychain is selected but Xcode won't recognize it. This is BEFORE even opening any projects. I repeated the whole CSR process 10 times and I'm ready to giving up. Looks like something is seriously wrong. – hyn Jun 16 '09 at 09:06
  • 78
    After 5 days of messing around with this, it finally worked. But don't know why. Apple sucks. – dontWatchMyProfile May 05 '10 at 11:37
  • Look at this [Official Apple Q&A](http://developer.apple.com/iphone/library/qa/qa2008/qa1618.html) – Casebash Sep 01 '10 at 03:44
  • Looks like a lot people are having the same problems on the official forums as well. It most certainly is a bug that cropped up only recently. – hyn Jun 16 '09 at 09:12
  • I find my solution at this other question. [See the answer to this question][1] [1]: http://stackoverflow.com/questions/6769345/xcode-4-valid-signing-identity-not-found-error-on-provisioning-profiles-on-a – Felipe Conde Mar 12 '12 at 20:21
  • I solved my problem at this [See the answer to this question][1] [1]: http://stackoverflow.com/questions/6769345/xcode-4-valid-signing-identity-not-found-error-on-provisioning-profiles-on-a – Felipe Conde Mar 12 '12 at 20:22
  • For the error - > Valid signing identity not found see Apple's published steps to resolve this problem, titled [What does 'Valid Signing Identity Not Found' mean and how do I resolve it?][1]. [1]:http://developer.apple.com/library/ios/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933-CH1-TROUBLESHOOTING_FAQ-WHAT_DOES__VALID_SIGNING_IDENTITY_NOT_FOUND__MEAN_AND_HOW_DO_I_RESOLVE_IT_ – Bobjt Jan 12 '12 at 23:50
  • When you get this error in Xcode 6.3, if offers to fix it for you. I used that option. Much easier than doing all this other crap. – SilentNot May 21 '15 at 00:06

33 Answers33

170

I had the same problem: I first downloaded my certificates to my small MacBook while on the run. When trying to install the certificates on my iMac... then I ran into the problems described on this page.

After spending hours pulling my hair out like many of you, I performed the following steps to fix it:

  1. Close all your stuff except your webpage that should be logged into App Dev center.

  2. Open Xcode. Click WINDOW > ORGANIZER. Then click the Devices tab and select "Provisioning Profiles" on the left. That should bring up your provisioning profiles. Highlight one by one (if more than 1), right click and delete profile. Yes, just do it! Delete them all! (I kept making a new one after a new one trying to make the thing work.)

  3. From the first page you see after logging into the App Dev Center on the right side click "iOS PROVISIONING PORTAL" > (do not "launch assistant"). Instead click on the left side. Select CERTIFICATES. You will probably have just one line listed with your name/company - from there click on the right side REVOKE. Click OK to verify that's what you want to do.

  4. On the same page click DEVICES. Click the box next to your device you are trying to provision and click REMOVE SELECTED. Again click OK to verify.

  5. Wait about 2 minutes to let Apple do their thing.

  6. Now click on "HOME" that is on the left side navigation.

  7. Click "Launch Assistant"

  8. create a new app ID - call it whatever you want. Just make sure it's unique enough to know that's the one you just created because the others you've been messing with all day will not be deleted from Apples Dev Center.

  9. You should be able to follow the rest of the Assistant without troubles -- the main thing is you just had to delete your old provision profiles and start over.

Good Luck!

David Underhill
  • 15,896
  • 7
  • 53
  • 61
Louie
  • 5,920
  • 5
  • 31
  • 45
  • 3
    i tried various "less destructive" approaches to getting my profiles setup again on my mac after a hd ssd resintall, and this is the only one that worked! kudos! – Brad Parks Oct 14 '10 at 01:50
  • 1
    fantastic louie..... it worked wonders for me... i have been scratching my head from past two weeks and then i saw ur post and wow.... KUDOS..... A VOTE UP FOR YOU ..... – A for Alpha Mar 21 '11 at 10:27
  • I just had to revisit my own post! I had to follow my old instructions to get my provisioning done. :) Glad to see it still works! – Louie Apr 09 '11 at 02:21
  • Worked a treat. I also tidied up the old certificates on my Mac by deleting them using KeyTool. – Steve Neal May 28 '11 at 11:06
  • 1
    Nice one! It might be necessary to remove old keys from the key chain as XCode refuses to build when there are two certificates (e.g. an old one and the newly created one) with the same name. – acme Jun 16 '11 at 16:24
  • Try the other solutions on this page *before* you try this one -- you might not have to delete everything to fix the problem. – jlstrecker Oct 24 '11 at 13:36
  • This worked! I found that the way you drag the provisioning profile into the xcode organizer makes the difference. You must drag it from the download straight onto the xcode icon in the dock. Not directly into the xcode window. – Albert Apr 11 '12 at 09:43
  • Due to the deletions and re-creations of various parts in the torture chain, could this be considered "restarting" the whole process? – Danny Feb 25 '13 at 23:54
  • Apple did a very bad job on this part. I always got different problems like this although it's still a bit better than Android development. – Bagusflyer Apr 05 '14 at 03:45
  • 4
    Not working for me. When I go to organizer and click "Devices" there is nothing which says Provisioning Profiles. – Robert Noack Apr 18 '14 at 16:07
  • it did not help in my particular issue - but take my upvote.. this topic is so extremely frustrating, and it seems this approach helps a lot of people - still better than reading through hundrets of sides of apple-doc's and still get no clue how to solve actually THIS problem.. – jebbie Sep 10 '15 at 14:58
  • As Robert stated it no longer seems to have the available clicks for step 2 – C. Skjerdal Nov 02 '18 at 23:51
  • there is no more "devices" tab in organizer – Zaporozhchenko Oleksandr Dec 06 '18 at 10:38
73

I encountered the same issue. This is because the private key of the certificate does not existing on your machine.

  1. If you are now using a new machine and download the certificate from website: You can export the certificate from the old machine and then import on the new machine.

  2. If you share the developer account with someone: You ask the account owner to send you an invitation and become a team member of that account. Then you can create your own certificate from scratch.

  3. If you don't want to handle all these sh*t: Just revoke the certificate on website and delete the copy on your local machine. Then request a new one. This should be the ultimate way for solving such issue.

Scott C Wilson
  • 19,102
  • 10
  • 61
  • 83
Rome Li
  • 361
  • 3
  • 4
  • 5
    I got a new machine, and I have to work on both of old & new for a while. 1st method solved my case. Thanks! – eonil Mar 16 '10 at 01:27
  • 3
    It should be highlighted that this response is particularly useful if you have **switched machines**. Thanks Rome Lee! – Eric Brotto Oct 30 '11 at 14:25
  • 1
    Similarily, Im prepping a my machine for use by a new user and found that the private keys were all under login. Exported them for the new user and it worked like a charm. Many thanks. – tapi May 08 '12 at 12:54
64

Had the same problem yesterday. Now, after signing to the developer portal, for every invalid provisioning profile have a button "Renew". After renewing and downloading updated provisioning profile all seems to work as expected, so problem is definitely solved :)

Update: you may have to contact Apple to get a "Renew"-button, or they removed it -- and the solution is to just download it and add it to the keychain, no need to renew.

Jeff Atwood
  • 63,320
  • 48
  • 150
  • 153
Valerii Hiora
  • 1,542
  • 13
  • 8
28

What I found was that I needed to drag the distribution_identity.cer file that I downloaded from the "Certificates -> Distribution" page on the developer program portal into the keychain access program, then this error went away.

MoDJ
  • 4,309
  • 2
  • 30
  • 65
  • I had a similar fix which worked for me. Instead of Certificates -> Distribution, I downloaded the cert from Certificates -> Development. Running Xcode 3.2.1. – Sam Nov 13 '09 at 22:52
  • 6
    That is what you are supposed to do (: The problem here is what happens when this doesn't work. – corydoras May 20 '10 at 06:36
  • Similar. My public and private key's were not paired until I downloaded both the development and distrobution certs and doubled clicked them to open in keychain. This fixed the problem. – robr Jul 09 '10 at 17:31
23

I solved it by

a) go to provisioning profile page on the portal

b) Click on Edit on the provisioning profile you are having trouble (right hand side).

c) Check the Appropriate Certificate box (not checked by default) and select the correct App ID (my old one was expired)

d) Download and use the new provisioning profile. Delete the old one(s).

Apparently there are 4 different causes of this problem:

  1. Your Keychain is missing the private key associated with your iPhone Developer or iPhone Distribution certificate.
  2. Your Keychain is missing the Apple Worldwide Developer Relations Intermediate Certificate.
  3. Your certificate was revoked or has expired.
  4. Online Certificate Status Protocol (OCSP) or Certificate Revocation List (CRL) are turned on in Keychain Access preferences

.

prasad
  • 101
  • 1
  • 3
  • 3
    For the benefit of others: this problem will manifest when your developer certificate expires and you generate a new one. Since it's new (not renewed), it does not appear on any of the provisioning profiles. You must go into each provisioning profile, select the new developer certificate and regenerate. Download and install these new provisioning profiles and you'll be good to go. – Steve Madsen Oct 11 '10 at 14:06
  • @SteveMadsen This was absolutely the case for me. I opened each of the provisioning profiles in the portal, selected the new developer certificate and hit refresh in Xcode. Worked like a charm. Thanks so much! This was driving me crazy! – Luke Oct 28 '11 at 02:36
  • I am having first problem. private key is not added to certificate in key chain access. But I am not able to solve this problem. Please help me with this. – keen Dec 05 '13 at 05:45
  • Thanks. My certificates/provisioning profiles was expiring (one day to go) and the problem started. So the lesson is don't wait till the last minute to update certificates and profiles. – kakyo May 07 '14 at 14:53
14

After carefully going through the thread here and checking all the solutions proposed by people, I can confidently claim this, after following the steps mentioned on Apple developer docs for creating CSR and mobile provision file, just do this!,

  1. Launch Xcode.
  2. Select window->Organizer
  3. Click this refresh button and that filthy yellow bar will remove instantly.

http://img.skitch.com/20100820-1ngm8an14c6fm3dt7g6j51d2nx.jpg

Trust me, you only have to do this. There is no need to repeat the process again and again to make sure that you doing it the right way. Just press Refresh, enter your login credentials and it's done.

nickalchemist
  • 2,211
  • 6
  • 31
  • 58
Taimur Ajmal
  • 2,778
  • 6
  • 39
  • 57
  • I get "An unexpected error occurred. Please try again. If the problem persists, please contact Apple Developer Support. blah" – Dave Jan 11 '11 at 02:22
  • 1
    When I did this in Xcode it did verify all the profiles and ended up with two valid ones. However, it did not import my Ad Hoc Distribution profile, which is the one I need. In order to get that, I had to go to the portal, fix the profile expiry, download it, and import into Xcode (double click will do). So - YMMV. – n13 Apr 02 '12 at 03:46
  • Worked for me perfectly !! Thanks man. Apple people are really the lamest...How could they even invent such a torturous way of testing YOUR app on YOUR device ??? This is beyond me. Friendly for the users, but makes the developer goes through hoops !!! Ridiculous. Anyway thanks mate !! – Yahel Sep 20 '12 at 14:18
  • if you are member of several teams, this might not lead to success – brainray Apr 26 '15 at 12:55
  • There is no longer a refresh button in ->Organizer as far as I can tell. XCode 7.3 – Joel Apr 25 '16 at 14:28
9

For me it only worked when the certificate and both keys were in the Login keychain. I had created a Development keychain before, but the Xcode Organizer wouldn't find the keys in there. So I moved them back to Login, quit the keychain tool - and voila, the error in Xcode Organizer went away! This was on Snow Leopard 10.6.2 with the 3.1.3 SDK.

Karsten Silz
  • 1,036
  • 11
  • 18
7

For development certificates you can just create a new one and match it to a profile. However for distribution, like when your going to submit to Apple, you cannot do this and must use the distribution certificate the team agent created. The problem is you need the private key on your machine. It's very simple, however, for the team agent who created the certificate to copy the private key to you, below are the instructions from Apple, I hope this helps.

It is critical that you save your private key somewhere safe in the event that you need to develop on multiple computers or decide to reinstall your system OS. Without your private key, you will be unable to sign binaries in Xcode and test your application on any Apple device. When a CSR is generated, the Keychain Access application creates a private key on your login keychain. This private key is tied to your user account and cannot be reproduced if lost due to an OS reinstall. If you plan to do development and testing on multiple systems, you will need to import your private key onto all of the systems you’ll be doing work on.

  1. To export your private key and certificate for safe-keeping and for enabling development on multiple systems, open up the Keychain Access Application and select the ‘Keys’ category.
  2. Control-Click on the private key associated with your iPhone Development Certificate and click ‘Export Items’ in the menu. The private key is identified by the iPhone Developer: public certificate that is paired with it.
  3. Save your key in the Personal Information Exchange (.p12) file format.
  4. You will be prompted to create a password which is used when you attempt to import this key on another computer.
  5. You can now transfer this .p12 file between systems. Double-click on the .p12 to install it on a system. You will be prompted for the password you entered in Step 4.
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
marchinram
  • 5,698
  • 5
  • 47
  • 59
5

The best answer I got was exporting your key, instead of just trying to import the cert file.

When you export the key from the keychain that generated the request, you get a Certificates.p12 file, which rolls the keys you need together.

Then import this into the new computer.

With keys like this, it's probably good to keep a rolled, certificate package file, because many times the "public" key, or cert file, is not enough to restore things from.

3

In my case, I copied the project from my iMac to my Macbook Pro and found out I didn't have my private key installed on the Macbook. So I exported my private key, copied and installed it to the Macbook, and voila it works! I've documented the information here: http://www.creatistblog.com/2009/09/iphone-developer-provisioning.html

3

Was facing a similar issue yesterday with our CI server. The app extension could not be signed with the error

Code Sign error: No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) matching the bundle identifier XXX were found.

Note: I had created my provisioning profiles myself from Developer portal (not managed by Xcode).

The error was that I had created the provisioning profiles using the Distribution certificate, but the build settings were set to use the developer certificate. Changing it to use Distribution certificate solved the issue.

enter image description here

Summary: Match the certificate used for creating the provisioning profile in build settings too.

Ayush Goel
  • 3,134
  • 27
  • 36
3

Just a note with Xcode 4: in the organizer there are two different sections in the left pane:

  1. Library > Provisioning profiles

  2. Devices > your device > Provisioning profiles

I was always puttings my provisioning profiles into 2. and even after cleaning and installing properly it was not working. Then I discovered 1. and finally I found the refresh button. If you select 'Automatic device provisioning' in 1. and click on refresh, then everything got validated (no yellow warning in 2. anymore).

Jerome Mouneyrac
  • 363
  • 2
  • 10
2

Simple steps to get this done:

  1. Start from keychain (which contains your dev key already) on your computer and create a request for certificate. Upload the request to dev site and create the certificate.
  2. Create a profile using the certificate.
  3. Download the profile and drop it on Xcode.

Now all the dots are connected and it should work. This works for both dev and distribution.

jack
  • 731
  • 7
  • 8
2

I logged into developer account and revoked the development certificate. After revoking and downloading the development certificate i double clicked the newly downloaded certificate and this time Private Key was there under development certificate in KeyChain Access.

Yasir Siddiqui
  • 435
  • 7
  • 18
2

A good way to ensure that this happens cleanly is to clean your login keychain completely first.

Also, a really important step is to unlock your keychain before you import the private key and public key

 security unlock-keychain -p password ~/Library/Keychains/login.keychain 

Import private key into login keychain :

security import PrivateKey.p12 -k ~/Library/Keychains/login.keychain 

1 identity imported.

Import public key into login keychain :

security import PublicKeyName.pem -k ~/Library/Keychains/login.keychain 

1 key imported.

Arunabh Das
  • 13,212
  • 21
  • 86
  • 109
2

I got it working after re-doing everything and then creating an empty project with XCode and building/running it to the device. XCode showed a window asking something like: Do you want to accept the developer certificate. I pressed "Always". Only after this step I got rid of the message "A valid signing identity matching this profile could not be found in your keychain" in Organizer.

Pompair
  • 7,083
  • 11
  • 60
  • 69
2

Hey guys, I had heaps of trouble with this yesterday. I went through the whole process a few times, requesting a new certificate request from the authority with the assistant, clearing out everything in the portal, uploading the certificate, creating a new profile and downloading everything. No dice.

However, check this out.

First up clear out all the certificates on the portal to start fresh.

After creating the new certificate request with the assistant, press "Show in Finder", and double click that bad boy. You should get a popup for the Certificate Assistant with a screen showing "Please specify the issuing Certificate Authority", etc. If you don't, just close it and double click again. Now just proceed through the dialog choosing "Request a certificate from an existing CA" - Continue Request is "Saved to disk" - Continue Save it where ever you like, even override the file.

At the end you should see the magic "Creating key pair"

Run over to the KeyChain access and you'll see your keys in there! Upload this certificate to the apple portal and then go through their wizard as normal, everything should work great now.

2

There are two different certificates for two different provisioning profiles (development and distribution). You have to install BOTH certificates in keychain. In the iPhone Developer Program Portal:

Certificates -> Development -> Download Certificates -> Distribution -> Download

Double click both certificates. After that both certificates must appear in Keychain.

Freeman
  • 5,810
  • 3
  • 47
  • 48
2

The answer is this revoke your Current Development Certificate and make a new one. follow the instructions on apples site on how to do so. Its that simple!! I had this exact problem.

2

Did you try rebooting your Mac and your device? Lame answer, but I always try that first.

Nosredna
  • 83,000
  • 15
  • 95
  • 122
1

"This was a bug on the Apple portal site. They were missing a necessary field in the provisioning profile. They fixed this bug late on 6/16/09. "

Akshay
  • 2,973
  • 6
  • 43
  • 75
David Smith
  • 426
  • 3
  • 7
1

I had the exact same problem and tried everything. For whatever reason the solution was that all my certificates had migrated to a keychain called "microsoft_intermediate_certificates". As it probably happened during an Xcode upgrade I have absolutely no idea why, but it may help somebody.

I moved all content of the Microsoft keychain to the login keychain and everything went back to normal.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
CodeFlakes
  • 3,671
  • 3
  • 25
  • 28
1

I finally got this to work after, like, 4 separate tries after incurring the same problem that was originally posted. So here's what happened, I am not sure if this is an old issue now (2009-07-09), but I will post anyway in case it is helpful to you. What worked for me... might work for you...

  1. start anew and delete the old private keys, public keys, and certificates in the keychain
  2. go through the whole process, request a certificate from a certificate authority, get a new public key, a new private key, and a new certificate. Note: when it worked I had exactly one private key, one public key, and one certificate
  3. Make a new provisioning profile (which utilizes the certificate that you just made) and put that in your organizer window in Xcode. Delete all the old BS.
  4. Run it.

Hopefully this helps.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
1

If you have new mac you can go to IOS developer center --> Provisioning Portal --> Certificates --> Development --> Revoke and create new certificate. My problem solved. My error is "Code Sign error: The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in your keychains"

ethemsulan
  • 2,241
  • 27
  • 19
1

I had this same problem but, it was due to my setting up "FileVault" on my Mac. I went into my keychain and set "login" to be my default and that fixed it.

Lou
  • 51
  • 1
  • 1
  • @Lou, that sound I face the problem the same to your before.... once before I stting up 'FileValut' , then I find the problem : all provision profile shows 'A valid signing identity matching this profile could not be found in your keychain'..... I try to fixed, but so far I have not solved it ... can you give me more detail tip on this ? How to update the keychain ? thanks for your help in advance.. – iXcoder Feb 28 '10 at 13:30
1

What you need:

1) A private and a public key.

They have this symbol in your keychain:

alt text

2) A certificate made from the signing request of those keys

3) A provisioning profile linked to that certificate

Let's say you change computers and want to set up Xcode with provisioning profiles again. How do you do it?

  1. Open Xcode, press ctrl + O to open the Organizer, and delete all provisioning profiles you might have installed already.
  2. Open keychain access, and create a signing request which you save to file (when you create the request, a private and public key is created in your keychain).
  3. Create/Update a certificate in the provisioning portal by sending apple this signing request
  4. Download and install the newly created certificate.
  5. Revoke your provisioning profiles and update them with the new certificate.
  6. Download and install the newly updated provisioning profiles.
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
quano
  • 18,812
  • 25
  • 97
  • 108
1

Everyone here is very wrong. All you need is to follow the steps that Apple provides in Managing Your Digital Identities.

It instructs you to export your certificates through Xcode and reimport through Xcode. It works great, but make sure your username is the same on both computers or it will fail.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
casey
  • 1,118
  • 1
  • 13
  • 25
  • 1
    You're not even answering the same question, so claiming that everyone else is "very wrong" is a tad glib, don't you think? – Tom Jun 13 '11 at 23:59
1

I just spent several hours on this fershlugginer issue, which cropped up after renewing my development license. To reiterate, everything was working without a hitch, then (thank you Apple!) it all got screwed up and stayed screwed up. None of the Apple official troubleshooting steps (linked to above) or possible resolution steps mentioned here resolved the issue for me.

What finally did it for me was to delete both my development and distribution certificates, revoke them in the provisioning portal, and then let Xcode AUTOMATICALLY refresh/issue them. Nothing else, in any order, was able to get both required certificates into my keychain with the private key correctly attached.

software evolved
  • 4,314
  • 35
  • 45
1

I don't know whether they really skipped it or if my eyes were just glazing over but....

Just in case anybody else is overlooking the same things that I did....

just as when you were developing and testing...

1) You need a DISTRIBUTION << CERTIFICATE >> 2) You need a DISTRIBUTION << PROVISIONING PROFILE >>

That is TWO STEPS on the portal in order to get the thing signed.

There I was, having created the developer CERTIFICATE and copied it to the Mobile Provisions folder, wondering why it didn't work.

As soon as I had the provisioning profile in place

* BINGO *

Dave Appleton
  • 465
  • 1
  • 6
  • 18
1

Here is what I did.

  1. Make sure your certificates have not expired, make sure you delete all the expired ones. Get new ones etc, Once you have make sure all that is the way it should be, then focus on your project files.
  2. in finder , go to your .xcodeproj files then show package contentes.
  3. open project.pbxproj in xcode or textedit.
  4. find every refrense to PROVISIONING_PROFILE and remove the GUID, just leave empty "" Depending on your project you should have about 12+ refrences, remove all of the GUIDS.

  5. Save file, then reopen your project in XCODE

  6. Re select the correct provision profiles for all possible code signings( they should not all be the same)
  7. Build your project and you should be good to go.

I think Xcode gets confused some how, and removing all the Provision Profiles from the project.pbxproj and then reselecting a valid profile will set it striaght.

J3RM
  • 1,702
  • 12
  • 17
0

Because I keep coming back to this question, I will leave my answer here for the solution that works for me. It turns out that for a same public/private key developer identifier of me, it's installed twice in my keychain. Both have private key. But when I compare, one is private key of me within my developer organisation, and another one is private key of me as a personal developer. It turns out Xcode keeps trying using the wrong key. Removing the wrong duplicate key solves all the problem. Hey future me, check this one first next time!

Chen Li Yong
  • 5,459
  • 8
  • 58
  • 124
0

For Xcode 13 (maybe earlier?) - The key to this is to use the "Build Settings" tab, not the "Signing and Capabilities" tab in your Target Settings. Once you are in "Build Settings", search for the "Signing" section (you can type "Signing" in the search box). There you will see a sub-section called Code Signing Identity. In that section you can click on each line and directly choose any certificate you have in your keychain. You need to do that for all of the relevant configurations (the ones that you want to upload to TestFlight/AppStore). When you go back to the "Signing and Capabilities" tab, you should see the results of what you did and the error should have gone away.

I got inspiration from this answer (below): https://stackoverflow.com/a/37043501/826946

But I thought that having this laid out explicitly might help.

Andy Weinstein
  • 2,639
  • 3
  • 21
  • 32
-1

I solved it. I had to drag the .cer files into KeyChain Access. But make sure "Login" is selected in the upper left. If not, Xcode will not see the cert and will not be able to sign your code.

Apple has some room for improvement in this department....

iOSDevSF
  • 1,169
  • 1
  • 13
  • 24