'"iPhone Distribution" certificate is not trusted
I just installed a new iPhone Distribution certificate that was exported as a .p12 from someone else's computer.
When I try to archive with a provisioning profile that's tied to this new certificate I get this Invalid trust settings error:
Restore system default trust settings for certificate "iPhone Distribution" in order to sign code with it.
However, when I Repair Trust Settings, which sets the Trust Settings for the certificate to "Use System Defaults", it says that the certificate is not trusted:
iPhone Distribution certificate is not trusted
If I try to archive in this state, I get this error:
Warning: unable to build chain to self-signed root for signer "iPhone Distribution"
And I'm stuck in an infinite loop. Please help!
Solution 1:[1]
I had the Apple Worldwide Developer Relations Certification Authority certificate that expires on Feb 7, 2023 at 3:48:47 PM.
My issue was resolved when I installed the one that expires on Feb 19, 2030 at 6:00:00 PM.
You can download either one of those here: https://developer.apple.com/account/resources/certificates/add
Solution 2:[2]
After not getting any luck downloading the Apple Worldwide Developer Relations Certification Authority certificate 2030, what worked for me was going to the system keychain and searching for the certificate that was having trouble (something like 5CTYZUT475) and I changed the always trust to use system defaults.
Solution 3:[3]
None of the above worked for fixing my "Developer ID Application" showing up as not trusted.
Turns out there was a different intermediate certificate called "Developer ID - G2 (Expiring 09/17/2031)" that I needed. Available for direct download from here.
Solution 4:[4]
in my case, it was command-line tools that were missing. I think command line tools automatically downloads worldwide certificate.
So I go to XCode preferences, then locations, and in command-line tools selected 13.3.
'Quit' Xcode relaunch XCode. Quit keychain and relaunch keychain. And now my ios distribution certificate was trusted.
Solution 5:[5]
For me it was helped installing new apple root certificate. Direct link which could be found here. Which could be found from that support page.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Adam Zarn |
| Solution 2 | jas-chu |
| Solution 3 | Erik J |
| Solution 4 | maddy |
| Solution 5 |



