近期开发中遇到下面的问题:
error: Invalid trust settings. Restore system default trust settings for certificate "Apple Development: " in order to sign code with it.
Warning: unable to build chain to self-signed root for signer "Apple Development: ******"
最后发现是苹果根证书出了问题(表面上没有问题),导致所有的证书失效了!
修复方案如下:
先从钥匙串中,把旧的 AppleWWDRCA删除
从网上下载 苹果开发者根证书最新版:
Apple Worldwide Developer Relations Certificate Authority (Expiring 02/20/2030)
拖动到 钥匙串 -> 系统目录里 (注意:不能放在 登录里,证书需要全部用系统默认的信任策略。)
如图所示: