I know there are lots of answers in this thread. I've tried every one of them but none worked for me.
TLDR:
Here is the solution:
- Update to xcode 11.4.1 or newer
Going through all the certificates in Keychain access
I found out that all of my developer certificates has a invalid status. And, I believe that, this is the root cause of this issue. I've tried the solution here saying delete Apple Worldwide Developer Relations Intermediate Certificate
and everything. But, It didn't work.
Then I came across this link. Apparently, the Apple Worldwide Developer Relations Intermediate certificate (AWDRI)
is set to expire in 2023 and developer certificates or any other certificates issued after January 28, 2021 won't be using that particular AWDRI
certificate. Instead of that they use a renewed certificate which is set to expire in 2030. And here comes the problem, The new renewed certificate only works in xcode versions of 11.4.1 or newer. And, I have an older version of xcode.
When I updated my xcode to latest version - 12.4 (I had to go through making space on my machine, updating macos and all) The problem went away. All my developer certificates on Keychain access
are now showing valid. And, I could see two AWDRI
certificates on my Keychain access
one expiring on 2023 and another one in 2030.
Description from the link I shared:
The current Apple Worldwide Developer Relations Certification Intermediate Certificate (intermediate certificate) is set to expire on February 7, 2023. The renewed certificate will be used to sign new software signing certificates issued after January 28, 2021 for the Apple Developer Programs. Remaining service certificates will be updated in the future and this page will be updated to reflect additional certificate changes.
And more...
This requirement also impacts all software signing certificates generated after January 28, 2021, by developers with Personal accounts in Xcode, as well as members of the Apple Developer Program, Apple Developer Enterprise Program, and iOS University Developer Program.
The new Apple Worldwide Developer Relations Intermediate Certificate is downloaded automatically by Xcode 11.4.1 or later and is available for download on the Certificate Authority page. Confirm that the correct intermediate certificate is installed by verifying that the expiration date is set to 2030.
Also they are mentioning about an issue with older versions:
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.
Automatically manage signing
solves this problem – onmyway133