Xcode 6 App Store 提交失败并显示“您的帐户已经拥有有效的 iOS 分发证书”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26717994/
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 03:28:43  来源:igfitidea点击:

Xcode 6 App Store submission fails with "Your account already has a valid iOS distribution certificate"

iosxcodeapp-storecertificate

提问by Jo?o Pereira

I'm using the latest XCode (6.1) and I need to submit the app as soon as possible, but I can't seem to get around the "Your account already has a valid iOS distribution certificate" error.

我正在使用最新的 XCode (6.1),我需要尽快提交应用程序,但我似乎无法解决“您的帐户已经拥有有效的 iOS 分发证书”错误。

I have the client's provisioning profile and I have his distribution certificate (which is valid) and his private key (I've checked using Keychain, it's definitely there). The bundle ID is also correct. I've deleted my provisioning profiles and certificates and reinstalled the client's many times now.

我有客户的配置文件,我有他的分发证书(有效)和他的私钥(我已经使用 Keychain 检查过,它肯定在那里)。捆绑 ID 也是正确的。我已经删除了我的配置文件和证书,并重新安装了客户端很多次。

What could be causing this issue? I've seen a lot of topics here on SO with this problem, so I apologise beforehand for creating yet another clone, but I really don't know how to fix this.

什么可能导致这个问题?我在这里看到了很多关于这个问题的话题,所以我事先为创建另一个克隆而道歉,但我真的不知道如何解决这个问题。

edit: I'm running a brand new install of Yosemite by the way

编辑:顺便说一下,我正在运行全新安装的优胜美地

采纳答案by Mahesh

Got it solved by editing the iOS Distribution Provision Profilein the Developer Member Center.

通过在 Developer Member Center 中编辑 iOS Distribution Provision Profile解决了这个问题。

For some reason there were 2 certificates to choose from for the Distribution Provisioning Profile. I switched over to the other certificateand I could Validate and Submit my Archive build for beta testing.

出于某种原因,分发供应配置文件有 2 个证书可供选择。我切换到另一个证书,我可以验证并提交我的存档版本以进行 beta 测试。

So, you may have more than one certificate for signing your Provision profiles. Make sure you have the right one (by trying all of them) and hopefully that should work.

因此,您可能有多个证书用于签署您的 Provision 配置文件。确保你有一个正确的(通过尝试所有这些),希望这应该有效。

I tried many things like Exporting Developer profile from Xcode Accounts and importing it in the organizer, installing the provision profiles from the member center, adding them to my keychain. But none of those worked. It started working only after editing the appropriate Provisioning Profile manually.

我尝试了很多事情,例如从 Xcode 帐户导出开发人员配置文件并将其导入组织者,从会员中心安装配置文件,将它们添加到我的钥匙串中。但这些都没有奏效。它仅在手动编辑适当的配置文件后才开始工作。

You could also trying removing all your available Provisioning Profiles and let Xcode create new ones for you. This will work too.

您还可以尝试删除所有可用的配置文件,让 Xcode 为您创建新的配置文件。这也会起作用。

回答by Troy Heere

I also had this issue, which turned out to be caused by an attempt to export for ad hoc deployment using a development provisioning profile instead of a distribution profile. It seems this is no longer supported in Xcode 6.1. Once I created an ad hoc profile and installed that the problem went away. A more useful error message would have saved me hours of work and would be greatly appreciated, Apple.

我也遇到了这个问题,结果证明这是由于尝试使用开发配置文件而不是分发配置文件导出临时部署引起的。Xcode 6.1 似乎不再支持此功能。一旦我创建了一个临时配置文件并安装,问题就消失了。更有用的错误消息可以节省我数小时的工作时间,我将不胜感激,Apple。

This thread was helpful:

这个线程很有帮助:

xcode 6 beta 2 issue with exporting ipa "Your account already has a valid iOS distribution certificate"

导出 ipa 的 xcode 6 beta 2 问题“您的帐户已经拥有有效的 iOS 分发证书”

回答by superarts.org

Besides all the other answers, there's one more possibility after 2/15/2016: the old World Wide certificate expired and I guess everyone has already downloaded the new cert (or check this out). However, you'll be seeing this error if you haven't remove the expired one. You may need to choose View -> Show Expired Certificatesto unhide expired certs. If the error is still there, try regenerate provisioning profile as advised by the others.

除了所有其他答案之外,2016 年 2 月 15 日之后还有一种可能性:旧的全球证书已过期,我想每个人都已经下载了新证书(或查看此)。但是,如果您没有删除过期的,您将看到此错误。您可能需要选择View -> Show Expired Certificates取消隐藏过期的证书。如果错误仍然存​​在,请尝试按照其他人的建议重新生成配置文件。

回答by Ayush Goel

I was moving to new Mac when I faced this issue. On your older Mac:

当我遇到这个问题时,我正在转移到新的 Mac。在较旧的 Mac 上:

  1. Go Preferences > Accounts > Select Account > Details.
  2. In the dropdown right click on iOS Distribution(or whatever is the name of your distribution certificate).
  3. Export...
  4. Set a password for the .p12file.
  5. Move and install this .p12in the new mac.
  6. Try Again.
  1. Preferences > Accounts > Select Account > Details
  2. 在下拉列表中右键单击iOS Distribution(或任何您的分发证书的名称)。
  3. Export...
  4. .p12文件设置密码。
  5. .p12在新的 mac 中移动并安装它。
  6. Try Again.

回答by Darvish Kamalia

Another possible cause for the problem (at least in my case) was that in my Keychain Access, I had two certificates for the team I was working with. One was expired, and the other one was the one I wanted to use. Deleting the expired certificate in Keychain Access solved the issue.

问题的另一个可能原因(至少在我的情况下)是在我的钥匙串访问中,我有两个与我一起工作的团队的证书。一个过期了,另一个是我想用的。在 Keychain Access 中删除过期的证书解决了这个问题。

回答by Peter Kaminski

I ran into this problem, and I wanted to avoid screwing up my push notifications.

我遇到了这个问题,我想避免搞砸我的推送通知。

The easy fix for me was to just go to developer.apple.com > project > certifications, ids, and profiles > profiles > create a new profile (for development or distribution)

对我来说,最简单的解决方法是转到 developer.apple.com > 项目 > 认证、ID 和配置文件 > 配置文件 > 创建新配置文件(用于开发或分发)

Download the created profile, drag and drop the profile over the Xcode icon, and then in your project target, set the new profile as the provisioning profile.

下载创建的配置文件,将配置文件拖放到 Xcode 图标上,然后在您的项目目标中,将新配置文件设置为配置文件。

This fixed my problem--it may provide further help in the future.

这解决了我的问题——它可能在未来提供进一步的帮助。

回答by Peter Lamberg

The error message could mean that you need to get the Distribution certificate and private key from the developer who created them.

该错误消息可能意味着您需要从创建它们的开发人员那里获取分发证书和私钥。

This can happen if some other team member has pressed the enticing "Reset" button (which means revoke certificate and create a new one). Here is a picture what the revoked certificate looks like:

如果其他团队成员按下了诱人的“重置”按钮(这意味着撤销证书并创建新证书),就会发生这种情况。这是吊销证书的样子:

picture showing the revoked cert message

显示已撤销证书消息的图片

You can export the valid certificate from the developer who created it and import it to other team members keychains.

您可以从创建它的开发人员那里导出有效证书并将其导入到其他团队成员的钥匙串中。

  • Go to "Keychain Access" app.
  • Click on the "Login" in the top left box
  • Click on the "Certificates" on the bottom left box
  • Check which team member has the valid certificate:
    • when clicking on the "iPhone Distribution" certificate
    • everyone else sees "This certificate is revoked" in red at the top.
      • (Maybe backup the deleted certificate to avoid doing anything irreversible)
      • deletethe revokedcertificates
  • Export the one valid certificate and distribute to team
  • Import the certificate file for everyone else
  • 转到“钥匙串访问”应用程序。
  • 点击左上角的“登录”
  • 点击左下角的“证书”
  • 检查哪个团队成员拥有有效证书:
    • 单击“iPhone Distribution”证书时
    • 其他所有人都会在顶部看到红色的“此证书已撤销”。
      • (也许备份删除的证书以避免做任何不可逆转的事情)
      • 删除吊销证书
  • 导出一张有效证书并分发给团队
  • 为其他人导入证书文件

回答by Ugo Marinelli

I recently changed computer. The reason for me was that I had several developer certificates in the Apple Developer member portal. The solution was :

我最近换了电脑。我的原因是我在 Apple Developer 会员门户中拥有多个开发者证书。解决方案是:

  • Go to Apple Developer Portal
  • Go Under Certificates-> Production
  • Click on "Revoke" for the oldest certificates and keep the most recent one
  • 前往 Apple 开发者门户
  • 进入证书->生产
  • 单击“撤销”以获取最旧的证书并保留最新的证书

Revoking certificates won′t affect your Apple Store apps :).

撤销证书不会影响您的 Apple Store 应用程序 :)。

回答by Ramakrishna

I solved this issue by editing the provisioning profile in the member center which is used in my app and re-install the provisioning profile.

我通过在我的应用程序中使用的会员中心编辑配置文件并重新安装配置文件来解决这个问题。

回答by theWalker

Today I was solve problem by delete from keychain old certificate Apple Worldwide Developer Relations Certification Authorityand install new one (exp. in 2023)

今天我通过从钥匙串旧证书Apple Worldwide Developer Relations Certification Authority 中删除并安装新证书来解决问题(预计在 2023 年)