我已经创建了证书来启用我的应用程序中的推送服务,但每次我尝试在我的钥匙链中添加证书时,添加证书后它会显示以下错误:

此证书的颁发者无效


当前回答

如果你从fastlane建议中得到这个错误

在尝试以上所有修复后 Security find-identity -v -p codesigning返回找到的有效身份 错误只发生在构建服务器上 如果你“手动”登录,一切正常

那么这可能是由于分发证书在错误的地方:

“登录”钥匙串在登录时工作 “系统”密钥链与构建服务器作为守护进程运行

用屏幕截图检查这个答案,你可以在登录钥匙串中右键单击分发证书,并将其粘贴到系统中。

其他回答

在苹果的开发者门户网站中,添加一个新证书,当被问到“你需要哪种类型的证书?”时,选择“WorldWide Developer relations certificate”。生成新的证书,下载并安装。当您这样做时,您将不再看到您所描述的消息。

编辑: 证书下载路径如下: https://www.apple.com/certificateauthority/ 您可以选择以下两种证书之一: "WWDR证书(将于02/07/23到期)" 或 "WWDR证书(2016年2月14日到期)"

如果你从fastlane建议中得到这个错误

在尝试以上所有修复后 Security find-identity -v -p codesigning返回找到的有效身份 错误只发生在构建服务器上 如果你“手动”登录,一切正常

那么这可能是由于分发证书在错误的地方:

“登录”钥匙串在登录时工作 “系统”密钥链与构建服务器作为守护进程运行

用屏幕截图检查这个答案,你可以在登录钥匙串中右键单击分发证书,并将其粘贴到系统中。

当地日期尽量早于2月14日。对我有用!不能完全解决问题,只能暂时解决问题。

2021年:

下载AppleWWDRCAG3。Cer(有效期至2030年) https://developer.apple.com/support/expiration/ 安装它

如果您的所有证书都出现“此证书的颁发者无效”错误,那么请执行以下步骤。

步骤:

Open Keychain and Click on Login -> All Items from the left panel. Now, Click on View -> Show Expired Certificates from the top navigation menu. Now search for "Apple Worldwide Developer Relations Certification Authority" and delete expired certificates. After deleting expired certificates, visit the following URL and download the new certificate, https://developer.apple.com/certificationauthority/AppleWWDRCA.cer. Double click on the newly downloaded certificate, and install it in your keychain. Double check: List expired certificates by following step number 3. Now you have a valid "Apple Worldwide Developer Relations Certification Authority" having expiry date 2023-02-07.

参考:

苹果全球开发者关系中级证书到期