Getting issue in keychain: iPhone Distribution Certificate is not trusted

I literally wasted 1 week solving this error and First i got code sign errors even on sample app created from Xcode after 4 days landed to this page and discovered that i need to add apple developer certificate to my keychain. Which you can find here But doing this only will not completely solved my error. I got further error Which was only 7 days old as of now. https://developer.apple.com/forums/thread/673846

So i again went to https://developer.apple.com/de/support/expiration/ page and found that if we have Xcode less than 11.4 or in some cases OS is not Big Sur then we will not be able to sign the app.

Known Issues

Xcode 11.4.0 and earlier may not be able to sign software using signing certificates issued by the new Apple Worldwide Developer Relations Certification Intermediate Certificate. If you’re unable to upgrade to a supporting version of macOS or Xcode on your build machine, you can build and archive your app using an earlier Xcode client and sign it for distribution using the latest release. Alternatively, you can utilize the codesign tool to sign your software using the command line.

So you need to upgrade to xcode > 11.4 other wise you may not able to sign the app.


Just download the certificate from here and install it. If that doesn't works have a look on https://developer.apple.com/de/support/expiration/.


I also had the similar issue:

iphone developer certificate is not trusted

It's because :

Issued by: Apple Worldwide Developer Relations Certification Authority

Try the following steps to resolve this issue.

  • You need renewed certificate, please click this link to get it: https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer

  • Open the terminal, enter the file directory, then install the new certificate with this command:

    sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain AppleWWDRCAG3.cer
    

Reference : https://github.com/actions/virtual-environments/issues/1620


https://developer.apple.com/de/support/expiration/ should be the answer. Just install the certificate manually or upgrade to Xcode 11.4.1 or later. After upgrading to Xcode >= 11.4.1 I had to open a Xcode project and had to wait few seconds. Afterwards the new Apple Worldwide Developer Relations Intermediate Certificate automatically has been installed.