Xcode - 帐户已经拥有有效的 iOS 分发证书
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30825447/
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
Xcode - account already has valid iOS Distribution Certificate
提问by Rafi
My developer team has recently added a new distribution certificate to our Apple Developer account. I downloaded it, and it is now on my Keychain. However, I get this message in Xcode:
我的开发人员团队最近向我们的 Apple 开发人员帐户添加了新的分发证书。我下载了它,它现在在我的钥匙串上。但是,我在 Xcode 中收到此消息:
You have a valid iOS Distribution certificate in the Member Center, but it is not installed locally. If your signing identity is installed on another Mac, you can export a developer profile on that Mac and import it on this Mac. You can also revoke your current certificate and request a new one.
您在会员中心拥有有效的 iOS 分发证书,但未在本地安装。如果您的签名标识安装在另一台 Mac 上,您可以在该 Mac 上导出开发人员配置文件并将其导入到这台 Mac 上。您还可以撤销当前的证书并申请新的证书。
When I go to Preferences > Accounts > View Details, I only see 1 certificate signing identity "iOS Development". How do I add the new Distribution certificate? I thought it was enough to just install it on my Keychain. When I try to drag the certificate from my Keychain to the signing identities in the View Details section, it doesn't work because I can't drag it in there.
当我转到首选项 > 帐户 > 查看详细信息时,我只看到 1 个证书签名身份“iOS 开发”。如何添加新的分发证书?我认为将它安装在我的钥匙串上就足够了。当我尝试将证书从我的钥匙串拖到查看详细信息部分中的签名身份时,它不起作用,因为我无法将它拖到那里。
I thought downloading the distribution certificate was enough to have it "installed locally" as Xcode said, but apparently it's not effective.
我认为下载分发证书足以让它像 Xcode 所说的那样“在本地安装”,但显然它无效。
Any help or advice would be appreciated. Thanks.
任何帮助或建议将不胜感激。谢谢。
采纳答案by ToolmakerSteve
Xcode / Preferences / Accounts - your apple id, is a member of the developer team? To the bottom right (of Accounts tab), under team name, it may default to "(your name) (Personal Team)", but there should also be another choice "(your team's name)". So if your team is named "The Awesome Team", then "The Awesome Team" should be selected under "Team Name", not your personal name.
Xcode / Preferences / Accounts - 你的apple id,是开发团队的成员吗?在右下角(帐户选项卡),在团队名称下,它可能默认为“(您的姓名)(个人团队)”,但也应该有另一个选项“(您的团队名称)”。因此,如果您的团队被命名为“The Awesome Team”,则应在“团队名称”下选择“The Awesome Team”,而不是您的个人姓名。
UPDATE:
How to "select the team name" has varied from version to version of Xcode.
First step is to click on the team name.
Then click on a button below it. In one version, that button said "Show Details..". As I write this, the button says "Download all profiles".
更新:
如何“选择团队名称”因 Xcode 版本而异。
第一步是点击团队名称。
然后单击其下方的按钮。在一个版本中,该按钮显示“显示详细信息...”。在我写这篇文章时,按钮上写着“下载所有配置文件”。
Another alternative is to double-clickthe team name. This should pop up some dialog.
另一种选择是双击团队名称。这应该会弹出一些对话框。
To verify that the desired team is still selected, you will have to quit Xcode, open it again, go to Preferences / Accounts again.
要验证仍然选择了所需的团队,您必须退出 Xcode,再次打开它,再次转到 Preferences/Accounts。
UPDATE #2:
In newer versions of Xcode, it seems that the real problem is "Automatically Manage Signing" isn't making the desired choice. Find that, and turn it off, then select the desired certificate. Sagar Mody's answerexplains a bit more.
更新 #2:
在较新版本的 Xcode 中,似乎真正的问题是“自动管理签名”没有做出所需的选择。找到并关闭它,然后选择所需的证书。Sagar 么的回答解释了更多。
If still not working for you, but works for someone else, might be worth asking them for screenshots of what they see in (1) Member Center in browser - Certificates, Provisioning Profiles, (2) Xcode / Preferences / Account, (3) "View Details" for their account. Worst case, ask them to temporarily change their password, and try THEIR account on your computer, verify you can get everything working if you log in as them. If you can do that, then there is something not set up right for your account. Try to find a difference in Member Center, or in those Xcode screenshots.
如果仍然不适合您,但适用于其他人,则可能值得向他们询问他们在 (1) 浏览器中的会员中心看到的内容的屏幕截图 - 证书、配置文件,(2) Xcode/首选项/帐户,(3)他们帐户的“查看详细信息”。最坏的情况是,要求他们临时更改密码,然后在您的计算机上尝试他们的帐户,如果您以他们的身份登录,请确认您可以使一切正常。如果您可以做到这一点,那么您的帐户设置不正确。尝试在会员中心或那些 Xcode 屏幕截图中找到不同之处。
回答by Sagar Mody
The answer above by @toolmakersteve is technically right.
@toolmakerssteve 上面的答案在技术上是正确的。
To achieve that what I did was, disabled "Automatically Manage Signing" then in Signing (Debug) / (Release) select "Eligible" bundle identifier.
为了实现这一点,我所做的是禁用“自动管理签名”,然后在签名(调试)/(发布)中选择“合格”包标识符。
From https://develop.apple.com/accountsdownload the Distribution Profile of XC: (Eligible bundle identifier). Double click on it install into Keychain Access.
从https://develop.apple.com/accounts下载 XC 的分发配置文件:(合格捆绑包标识符)。双击它安装到 Keychain Access。
Ensure in Xcode under "Signing Certificate" it shows "iPhone Distribution: (Organisation Name)" and not "iPhone Developer: (Your / Developer Name"
确保在“签名证书”下的 Xcode 中显示“iPhone 分发:(组织名称)”而不是“iPhone 开发人员:(您的/开发人员名称”)
Now build and archive and the export worked successfully for me. Hope this solves the issue for you too. This was really frustrating.
现在构建和存档,导出对我来说成功了。希望这也能为您解决问题。这真的很令人沮丧。