ios 用于签署“AppName”的证书已过期或已被吊销。需要更新的证书才能签署和安装应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37164314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 09:03:11  来源:igfitidea点击:

The certificate used to sign "AppName" has either expired or has been revoked. An updated certificate is required to sign and install the application

iosxcode

提问by Tam

I get the following error message whenever I try to build to an actual device (works fine when using the simulator, and I can build to and install via TestFlight without issue):

每当我尝试构建到实际设备时,我都会收到以下错误消息(使用模拟器时工作正常,我可以通过 TestFlight 构建和安装而不会出现问题):

Unable to install "AppName"

无法安装“AppName”

The certificate used to sign "AppName" has either expired or has been revoked. An updated certificate is required to sign and install the application.

用于签署“AppName”的证书已过期或已被吊销。签名和安装应用程序需要更新的证书。

Everything was working fine, then this error started appearing for seemingly no reason. I have tried the following fixes (multiple times, and in varying orders), but nothing has worked:

一切正常,然后似乎无缘无故地开始出现此错误。我已经尝试了以下修复(多次,并以不同的顺序),但没有任何效果:

  • Restart Mac
  • Restart Xcode
  • Re-install Xcode
  • Re-install certificates & provisioning profiles (overwriting old ones, and completely deleting old ones)
  • Delete & Revoke old certificates & re-create and install them
  • Preferences -> Accounts -> View Details -> Download All
  • Edit: Removed all expired certificates & replaced with updated versions
  • Deleted all files related to app development, then cloned fresh from git
  • 重启 Mac
  • 重启Xcode
  • 重新安装Xcode
  • 重新安装证书和配置文件(覆盖旧的,并完全删除旧的)
  • 删除和撤销旧证书并重新创建和安装它们
  • 首选项 -> 帐户 -> 查看详情 -> 全部下载
  • 编辑:删除所有过期的证书并替换为更新版本
  • 删除与应用程序开发相关的所有文件,然后从 git 克隆新文件

I've tried building & running the app on a different Mac and it works fine, so it's definitely something wrong with my machine but I have no idea what.

我试过在不同的 Mac 上构建和运行应用程序,它运行良好,所以我的机器肯定有问题,但我不知道是什么。

采纳答案by Tam

Managed to solve the issue by moving the apps source files to a new directory. Still no idea what exactly was causing the issue, but this fix works well enough.

设法通过将应用程序源文件移动到新目录来解决该问题。仍然不知道究竟是什么导致了这个问题,但这个修复程序已经足够好了。

回答by Bright Future

A Product -> Cleandid all the work for me :)

AProduct -> Clean为我做了所有的工作:)

回答by Fonix

What fixed it for me was to go to preferences and under accounts select your developer profile and go view details, then there is a signing certificate called 'iOS Development' (maybe you are signing with a different one though, but this is the automatic one) hit the reset button next to it and then try again.

对我来说修复的是转到首选项并在帐户下选择您的开发人员资料并查看详细信息,然后有一个名为“iOS 开发”的签名证书(尽管您可能正在使用不同的签名,但这是自动签名的) ) 点击它旁边的重置按钮,然后再试一次。

回答by Ankit Kumar

Follow this-

按照这个——

  1. How to remove provisioning profiles from Xcodeto delete your certificates form machine
  2. Generate new certificates and you're done :)
  3. Clean your project (CMD-Shift-K)if you get this error Reason: no suitable image found. Did find:....
  1. 如何从 Xcode中删除配置文件以删除您的证书表单机器
  2. 生成新证书,你就完成了:)
  3. 如果出现此错误,请清理您的项目(CMD-Shift-K)原因:找不到合适的图像。有没有发现:....

回答by Hymanyshan

rename your catalog, don't contain Decimal point & 0(zero).

重命名您的目录,不要包含小数点和 0(零)。

回答by Jorge Casariego

I had this problem as well, and tried everything. Regenerating all my certificates. Clearing my certificates on the keychain. Regenerating my certificates and nothing worked.

我也遇到了这个问题,什么都试过了。重新生成我所有的证书。清除我在钥匙串上的证书。重新生成我的证书,但没有任何效果。

Finally the solution for me was:

最后对我来说解决方案是:

  1. Going to Apple Developer
  2. Navigate to Provisional profiles sections
  3. Regenerate provisional profiles (plus button) for my specific app.
  4. Then download these to my Mac and click on them to install.
  1. 苹果开发者
  2. 导航到临时配置文件部分
  3. 为我的特定应用程序重新生成临时配置文件(加号按钮)。
  4. 然后将这些下载到我的 Mac 并单击它们进行安装。

回答by Thomas Suedbroecker

I had the same issue with a cordova application creating the ios platform.

我在创建 ios 平台的cordova应用程序中遇到了同样的问题。

Today I made a update of the cordova an I recognize that now also a Project.xcworkspace file were created.

今天我更新了cordova,我意识到现在还创建了一个Project.xcworkspace文件。

Using the .xcworkspace file everything works fine. Why what cordova did change I don't know. Maybe you can inspect in detail the update here: https://cordova.apache.org/docs/en/latest/guide/overview/

使用 .xcworkspace 文件一切正常。为什么科尔多瓦确实改变了我不知道。也许您可以在此处详细检查更新:https: //cordova.apache.org/docs/en/latest/guide/overview/

enter image description here

在此处输入图片说明

回答by Bogdan Balta

If you are sure your certificates and your provisioning profiles are valid, then you should check expired Apple hidden certificates in you Keychain Access application.

如果您确定您的证书和配置文件是有效的,那么您应该在 Keychain Access 应用程序中检查过期的 Apple 隐藏证书。

I had a similar problem while trying to submit my archive to the App Store and the solution was to update the certificate provided by Apple that expires on 14 Feb 2016 and causes impossibility of submission.

我在尝试将我的存档提交到 App Store 时遇到了类似的问题,解决方案是更新 Apple 提供的证书,该证书于 2016 年 2 月 14 日到期并导致无法提交。

You should follow these steps:

您应该按照以下步骤操作:

Xcode 7 error: "Missing iOS Distribution signing identity for ..."

Xcode 7 错误:“缺少 iOS 分发签名标识……”

And also check this documentation page:

并检查此文档页面:

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

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

回答by Said-Abdulla Atkaev

This solution worked for me:

这个解决方案对我有用:

Go to Xcode-> Preferences-> Accounts-> "Your account"-> Create new iOS Development Certificate

转到Xcode-> Preferences-> Accounts-> "Your account"-> Create new iOS Development Certificate

Fin.

鳍。

回答by fewspider

remove your account in xcode preferences, add again, it works.

在 xcode 首选项中删除您的帐户,再次添加,它可以工作。