在钥匙串中出现问题:iPhone 分发证书不受信任

Getting issue in keychain: iPhone Distribution Certificate is not trusted

我正在开发 iOS 企业应用程序,现在我们的 iOS 分发证书已过期,我正在使用以下步骤创建新证书:

  1. 从钥匙串访问创建证书签名请求。
  2. 使用 developer.apple.com 登录并使用证书签名请求生成分发证书。
  3. 下载新的 iOS 分发证书并安装。

在此之后,我可以在钥匙串访问中看到 iOS 分发证书,但出现错误: "iPhone 分发证书不受信任"。

此外,我尝试使用自动管理签名,并尝试导出 ipa 文件,但出现以下错误:

请帮我解决这个错误。

https://developer.apple.com/de/support/expiration/ 应该是答案。 只需手动安装证书或升级到 Xcode 11.4.1 或更高版本。升级到 Xcode >= 11.4.1 后,我不得不打开一个 Xcode 项目并等待几秒钟。之后自动安装了新的 Apple 全球开发者关系中级证书。

只需从以下位置下载证书 here and install it. If that doesn't works have a look on https://developer.apple.com/de/support/expiration/.

我也遇到了类似的问题:

因为:

Issued by: Apple Worldwide Developer Relations Certification Authority

请尝试以下步骤来解决此问题。

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

当前的Apple Worldwide Developer Relations Certification Intermediate Certificate(中级证书)将于2023年2月7日到期。更新后的证书将用于签署2021年1月28日之后为Apple Developer颁发的新软件签名证书程式。将来会更新剩余的服务证书,并且会更新此页面以反映其他证书更改。

https://developer.apple.com/support/expiration/

我确实浪费了 1 周的时间来解决这个错误,并且 首先,即使在从 Xcode 创建的示例应用程序中,我也遇到了代码签名错误 4 天后登陆此页面,发现我需要将苹果开发者证书添加到我的钥匙串中。你可以找到 here 但是这样做并不能完全解决我的错误。 我得到了进一步的错误,截至目前只有 7 天。 https://developer.apple.com/forums/thread/673846

所以我再次转到 https://developer.apple.com/de/support/expiration/ 页面,发现如果 Xcode 小于 11.4 或者在某些情况下 OS 不是 Big Sur 那么我们将无法签署应用程序。

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.

所以您需要升级到 xcode > 11.4 否则您可能无法签署该应用程序。