843

I tried to upload my App to iTunes Connect resp. AppStore and got the following error:

Failed to locate or generate matching signing assets

Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues.

Missing iOS Distribution signing identity for ... Xcode can request one for you.

Before I setup a new development machine, exported the developer accounts via Xcode 7 from the old to the new machine.

What can I do to fix this?

Matrosov Alexander
  • 20,713
  • 42
  • 130
  • 259
Awsed
  • 8,574
  • 5
  • 22
  • 25
  • You also need to have distribution profile and certificates along with its keys in order to generate IPA (Even with dev profile) – Bhumit Mehta Sep 28 '15 at 10:53
  • 1
    With the new Xcode 7 developer account import export also the profiles and certificates are exported. In my case I needed to transfer the "Apple World Wide Developer Relations Certificate Authority" certificate additionally (see answer below) – Awsed Sep 28 '15 at 11:00
  • 1
    @Awsed you can find details process for Certificates & Profile in [Apple Documentation](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html). It would be helpful. – Dipen Panchasara Sep 29 '15 at 06:17

11 Answers11

1951

From Apple -

Thanks for bringing this to the attention of the community and apologies for the issues you’ve been having. This issue stems from having a copy of the expired WWDR Intermediate certificate in both your System and Login keychains. To resolve the issue, you should first download and install the new WWDR intermediate certificate (by double-clicking on the file). Next, in the Keychain Access application, select the System keychain. Make sure to select “Show Expired Certificates” in the View menu and then delete the expired version of the Apple Worldwide Developer Relations Certificate Authority Intermediate certificate (expired on February 14, 2016). Your certificates should now appear as valid in Keychain Access and be available to Xcode for submissions to the App Store.

As noted in a comment below, the expired certificate also needs to be removed from the login section, as well:

To all that cannot get it working despite the instructions... There are two expired WWDR certs. One is in login keychain, and the other one is in the System. You have to delete both of them in order to make things working

Michael Oryl
  • 18,335
  • 14
  • 68
  • 107
Rajat Talwar
  • 11,876
  • 1
  • 16
  • 12
  • 63
    I think this was the best answer because it included instructions about deleting the expired certificate. This whole issue is cray cray. – Chad Pavliska Feb 15 '16 at 04:44
  • 12
    It has happened every two years; many app stops working on Mac until the user restarts their mac. Of course they will blame you. At least the new certificate does not expire until 2023. – Tibidabo Feb 15 '16 at 05:35
  • @nischalhada Still I am getting the same issue, can anyone assist me? – Anand Gautam Feb 15 '16 at 09:29
  • As mentioned, I have deleted expired version of the Apple Worldwide Developer Relations Certificate Authority Intermediate certificate from “Show Expired Certificates”. But still m getting the same issue, can someone please help me? – Anand Gautam Feb 15 '16 at 09:40
  • 2
    I must first delete expired certificate and then import new from file menu – Libor B. Feb 15 '16 at 10:06
  • @nischalhadaI followed above answer but not working. Should I need to add again this dowloaded file after deletion? – Anand Gautam Feb 15 '16 at 10:31
  • 4
    Thank you my friend! If it is not working: Are you sure you added the new one? I had to restart my mac and download it again because my Mac didn't want to add it. (I knew it because I wasn't asked to enter my password...) – Godlike Feb 15 '16 at 10:50
  • 131
    To all that cannot get it working despite the instructions... There are _two_ expired WWDR certs. One is in login keychain, and the other one is in the System. You have to delete _both_ of them in order to make things working. – Aleks N. Feb 15 '16 at 14:45
  • 3
    Make sure when you go to "Keychain Access", you go to Keychains > System and delete the old certs out of there as well. My signing identities were all revoked until I did this. – wowzuzz Feb 15 '16 at 20:42
  • I have to drag the new cert to the Key Chain window in the System chain because double click it show em an error: " The “System Roots” keychain cannot be modified.... " Thanks for the answer and the link – Bruno Berisso Feb 16 '16 at 18:53
  • downloaded, imported, deleted expired one from login, did NOT work | deleted the expired from the system, did NOT work | restarted XCode, WORKED – misaxi Feb 18 '16 at 01:03
  • You will need to restart either Xcode or your Mac, if restarting Xcode doesn't work. – PruitIgoe Feb 18 '16 at 11:40
  • 1
    Most important part: Make sure to select “Show Expired Certificates” in the View menu -- see you all in 2023. :) – Ryan Feb 18 '16 at 15:34
  • 1
    I didn't need to restart anything. It just worked after deleting the old certificate and importing new. – Przemysław Wrzesiński Feb 18 '16 at 18:12
  • as @Avaan said Delete "Apple Worldwide Developer Relations Certificate Authority certificates" also from "System" tab. This saves my day! – vgarzom Feb 18 '16 at 22:06
  • Dumbest thing ever. Is this really a feature instead of a bug? – Josh Woodcock Feb 19 '16 at 06:46
  • I am unable to delete the existing expired Apple WWDRC Certificate or import the new one :( https://www.dropbox.com/s/brxegvo9j458k3e/Screenshot%202016-02-19%2017.45.13.png – Anuj Rajput Feb 19 '16 at 12:53
  • This solution worked great for me, with the extra step that in Keychain Access, I had to click "All Items" under "Category" in order to see and delete the expired WWDR cert. – Steve Saporta Feb 19 '16 at 14:17
  • saved me too...didn't need to restart anything though for me BOTH certificates appeared under 'login' and none under 'system' – BIU Feb 22 '16 at 10:13
  • 1
    I just wanted to add that the "Expires" date may not be 14 February. For me it was 15 February because of the timezone I'm in. – Monomeeth Feb 24 '16 at 08:43
  • I had to delete more than two expired ones. And, strangely, even though I was able to see expired certificates elsewhere in keychain, I still had to select "Show Expired Certificates" to see these ones. – ED-209 Mar 04 '16 at 15:12
  • 1
    Note, I didn't have to delete anything. I just downloaded the mentioned file, dbl clicked on it. Then pressed retry in Xcode and it worked. – Ryan R Mar 05 '16 at 08:28
  • 1
    You don't need to restart your Mac or XCode, but do kick off a new archive or you might get another error. – Alex311 Mar 16 '16 at 17:15
  • 1
    Amazes me that XCode doesn't download the new certificate automatically. – Max Woolf Apr 22 '16 at 08:05
  • Once I installed this certificate, all of my certificates gone green. – yong ho May 05 '16 at 05:28
  • 2
    Oh, I am so angry. First off, thank you - this fixed my issue. But seriously Apple, this is 2016. Why the **** don't you provide useful error messages when something goes wrong ? Every single year that I've used Xcode for in-house apps, something else quirky and annoying has slipped in, and this rubbish environment just doesn't do anything to make life easier. Seriously angry, with how rubbish Xcode continues to be.... – Mike Gledhill May 12 '16 at 13:22
  • how to check the cert expired or not from terminal? – Kumaresan P Sep 18 '18 at 12:23
564

I also faced the same issue today. The following steps fixed my issue.

  1. Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
  2. Double-click to install to Keychain.
  3. Then in Keychain, Select View -> "Show Expired Certificates" in Keychain app.
  4. It will list all the expired certifcates.
  5. Delete "Apple Worldwide Developer Relations Certificate Authority certificates" from "login" tab
  6. And also delete it from "System" tab.

Now you are ready go.

Avaan
  • 4,709
  • 1
  • 8
  • 13
  • 62
    "6. And also delete it from "System" tab." step is solved my problem. This is the correct answer!!! – EFE Feb 15 '16 at 11:04
  • 4
    Me too! I fixed with delete it from "System" tab." step – Edward Chiang Feb 18 '16 at 07:07
  • 1
    I'm following these steps including deleting it from system, however every time I open the extension builder (safari developer) the old expired certificate reappears. Any ideas? – Andre Feb 19 '16 at 19:40
  • 3
    The above issue was solved by following this step "If your certificate is not available in Safari Extension Builder, update your signing system to OS X El Capitan v10.11.4 beta" on the following page: [certificate expiration](https://developer.apple.com/support/certificates/expiration/) – Andre Feb 19 '16 at 21:57
  • for those who want to know where to find the certificates: [Apple Certificated](http://www.apple.com/certificateauthority/) – Jorge Casariego Aug 24 '16 at 14:14
41

I kept running into the issue and saw that all my certs were invalidated -- oh no!

It turns out I never deleted the expired cert. It was not showing up for me, until I selected from Keychain Access application:

View->Show Expired Certificates

then

System->All Items

will finally display that gnarly expired cert. Delete that and retry from XCode will pick up the new valid certs.

Just make sure you search "All Items" in the Keychain Access app. The invalidated certs are a result of pointing to the expired certificate that has not been deleted yet.

Ziad Elkurjie
  • 411
  • 4
  • 2
33

The below process will solve the problem,

1: Open KeyChain access, and Delete "Apple world wide Developer relations certification authority" (Which expires on 14th Feb 2016) from both "Login" and "System" sections. If you can't find it, use “Show Expired Certificates” in the 'View' menu.

enter image description here

2: Now download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and double click the certificate to add it to Keychain access > certificates (which expires on 8th Feb 2023). Now the valid status of the certificates should turn green like below.

enter image description here

Once check the status.

Teja Kumar Bethina
  • 3,240
  • 24
  • 32
21

Apple has made following changes so download new certificate developer.apple.com

renewed certificate and place it as below screen shots .In the keychain as below screen shots click on system and then certificate. Delete the expired certificate . Then drag and drop the AppleWWDRCA.cer that you downloaded from above link

Apple Worldwide Developer Relations Intermediate Certificate Expiration

To help protect customers and developers, we require that all third party apps, passes for Apple Wallet, Safari Extensions, Safari Push Notifications, and App Store purchase receipts are signed by a trusted certificate authority. The Apple Worldwide Developer Relations Certificate Authority issues the certificates you use to sign your software for Apple devices, allowing our systems to confirm that your software is delivered to users as intended and has not been modified.

The Apple Worldwide Developer Relations Certification Intermediate Certificate expires soon and we've issued a renewed certificate that must be included when signing all new Apple Wallet Passes, push packages for Safari Push Notifications, and Safari Extensions starting February 14, 2016.

While most developers and users will not be affected by the certificate change, we recommend that all developers download and install the renewed certificate on their development systems and servers as a best practice. All apps will remain available on the App Store for iOS, Mac, and Apple TV.

Since different methods can be used for validating receipts and delivering remote notifications, we recommend that you test your services to ensure no implementation-specific issues exist. Your apps may experience receipt verification failure if the receipt checking code makes incorrect assumptions about the certificate. Make sure that your code adheres to the Receipt Validation Programming Guide and resolve all receipt validation issues before February 14, 2016.

enter image description here

Sevle
  • 3,014
  • 2
  • 17
  • 28
Nischal Hada
  • 3,050
  • 2
  • 24
  • 52
12

After searching for a while I found out that it is not sufficient to export the developer accounts from Xcode and import these on the new machine, again via Xcode.

Additionally I needed to copy the Certficate named "Apple World Wide Developer Relations Certificate Authority" from the keychain of the former development machine to the keychain of the new one.

This solved the problem for me.

Awsed
  • 8,574
  • 5
  • 22
  • 25
  • 10
    You can install it use this link:https://developer.apple.com/certificationauthority/AppleWWDRCA.cer – ERU Dec 02 '15 at 09:34
12

I imported the new Apple WWDR Certificate that expires in 2023, but I was still getting problems and my developer certificates were showing the invalid issuer error.

In keychain access, go to View -> Show Expired Certificates, then in your login keychain highlight the expired WWDR Certificate and delete it. I also had the same expired certificate in my System keychain, so I deleted it from there too.(Important)

After deleting the expired cert from the login and System keychains, I was able to build for Distribution again.

Ashish Thakkar
  • 916
  • 8
  • 27
4

I removed old AppleWWDRCA, downloaded and installed AppleWWDRCA, but problem remained. I also, checked my distribution and development certificates from Keychain Access, and see below error;

"This certificate has an invalid issuer."

Then,

  1. I revoked both development and distribution certificates on member center.
  2. Re-created CSR file and add development and distribution certificates from zero, downloaded them, and installed.

This fixed certificate problem.

Since old certificates revoked, existing provisioning profiles become invalid. To fix this;

  1. On member center, opened provisioning profiles.
  2. Opened profile detail by clicking "Edit", checked certificate from the list, and clicked "Generate" button.
  3. Downloaded and installed both development and distribution profiles.

I hope this helps.

Berk
  • 1,141
  • 11
  • 15
3

My answer was different and came along with the message:

resource fork, Finder information, or similar detritus not allowed

The solution was to do with generated graphics:

Code Sign Error in macOS Sierra Xcode 8 : resource fork, Finder information, or similar detritus not allowed

Community
  • 1
  • 1
Guy Lowe
  • 1,853
  • 1
  • 20
  • 35
  • Helped me, thanks! Had the same problem, indeed to do with generated graphics and the same error message. – Daan Jun 06 '17 at 09:25
2

Don't forget to also install the iOS cert for your Apple Developer Account.

user542319
  • 293
  • 2
  • 4
  • 14
1

Make Sure that in Project Navigator > Signing > Team , A team name must need be selected.

enter image description here

garg
  • 2,344
  • 20
  • 20