xcode 您的帐户已有有效的 Developer ID 应用程序证书
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33651758/
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
Your account already has a valid Developer ID Application certificate
提问by NeoID
The last couple of days I've struggled with code signing my cocoa app in Xcode. I've read through all similar topic that looked to be related, but nothing has helped.
过去几天,我一直在努力在 Xcode 中为我的可可应用程序进行代码签名。我已经阅读了所有看起来相关的类似主题,但没有任何帮助。
Whenever I try to export my archive I get this error message:
每当我尝试导出我的档案时,我都会收到以下错误消息:
I've tried to delete everything in my keychain and all profiles/certificates that I'm allowed to delete/revoke in the member center. However, I still get the same error with no "Fix" or "Reset" button. How should I proceed in order to get my application signed for distribution outside of store?
我试图删除钥匙串中的所有内容以及我可以在会员中心删除/撤销的所有个人资料/证书。但是,我仍然遇到相同的错误,没有“修复”或“重置”按钮。我应该如何进行以使我的应用程序签名以便在商店外分发?
回答by FreeNickname
Go to Preferences -> Accounts, choose your account, click "View Details" in the bottom right corner and in the dialog click Download all in the bottom left corner.
转到首选项 -> 帐户,选择您的帐户,单击右下角的“查看详细信息”,然后在对话框中单击左下角的全部下载。
Also, take a look at fastlane.tools. It is a great set of tools, which is, among other things, capable of dealing with code signing issues. Calling cert
and sigh
is sometimes enough to deal with many code signing-related problems.
另外,看看fastlane.tools。它是一套很棒的工具,除其他外,还能够处理代码签名问题。调用cert
和sigh
有时足以处理许多与代码签名相关的问题。
回答by lukkea
I had installed my Developer ID Application Certificate on a different Mac and was getting the same error as in the question when I tried to use that certificate on a "new" Mac.
我已经在另一台 Mac 上安装了我的开发人员 ID 应用程序证书,并且在我尝试在“新”Mac 上使用该证书时遇到了与问题相同的错误。
This fixed it for me:
这为我修复了它:
I still have the other Mac so I exported the Developer Accounts from that one again:
我还有另一台 Mac,所以我再次从那台 Mac 导出了开发者帐户:
- Go to XCode | Preferences | Accounts
- Click the "cog" in the bottom-left-hand-corner next the the plus and minus signs
- Click "Export Developer Accounts"
- Save the exported file somewhere accessible to your other Mac
- 转到 XCode | 偏好 | 帐户
- 单击左下角加号和减号旁边的“齿轮”
- 点击“导出开发者账户”
- 将导出的文件保存在其他 Mac 可访问的位置
Then, on my "new" Mac:
然后,在我的“新”Mac 上:
- Go to XCode | Preferences | Accounts
- Select the Apple ID that represents my dev certs
- Click the minus sign in the bottom left hand corner to delete that account
- Quit XCode
- Open Key Chain Access
- Delete all Developer Certificates
- Close Keychain Access
- Go to XCode | Preferences | Accounts
- Click the "cog" in the bottom-left-hand-corner next the the plus and minus signs
- Click "Import Developer Accounts"
- Select the file exported on the "old" Mac above and import
- 转到 XCode | 偏好 | 帐户
- 选择代表我的开发证书的 Apple ID
- 单击左下角的减号删除该帐户
- 退出 XCode
- 打开钥匙链访问
- 删除所有开发者证书
- 关闭钥匙串访问
- 转到 XCode | 偏好 | 帐户
- 单击左下角加号和减号旁边的“齿轮”
- 点击“导入开发者账户”
- 选择上面“旧”Mac上导出的文件并导入
回答by pkamb
I'm hitting this same issue.
我遇到了同样的问题。
The error appears to be telling you that valid Developer ID Certs have been created under your developer account, but they are not currently on your Mac, so they cannot be used.
该错误似乎是在告诉您已在您的开发者帐户下创建了有效的开发者 ID 证书,但它们目前不在您的 Mac 上,因此无法使用。
The solution would be to download the Developer ID Cert(s) from the web. However, you likely do not have the Private Key used to sign these certs. So at this point they are rather useless.
解决方案是从 Web 下载开发人员 ID 证书。但是,您可能没有用于签署这些证书的私钥。所以在这一点上它们是相当无用的。
In my case, the further problem is that I already have 5 Developer ID Certificates in my account. I'm not quite sure where these came from. They were created years ago, perhaps when I was attempting to create Mac App Store certs? Or perhaps by clicking that damn Fix Issue
button...
就我而言,另一个问题是我的帐户中已经有 5 个开发人员 ID 证书。我不太确定这些来自哪里。它们是几年前创建的,也许是在我尝试创建 Mac App Store 证书时?或者也许通过点击那个该死的Fix Issue
按钮......
There appears to be a limit of 5 Developer ID Certificatesper developer account, by default.
默认情况下,每个开发者帐户似乎有 5 个开发者 ID 证书的限制。
Developer ID Certificates are created, now, through Xcode rather than via the Members Center:
现在,开发人员 ID 证书是通过 Xcode 而不是通过会员中心创建的:
However, in Xcode, there is no longer a button to "Create" a new cert. The only button is "Reset". This button simply links me back to the Members Center in my web browser, so is completely useless...
但是,在 Xcode 中,不再有“创建”新证书的按钮。唯一的按钮是“重置”。此按钮只是将我链接回 Web 浏览器中的会员中心,因此完全没用...
Via the Members Center, Developer ID Certificates cannotbe revoked, as you would an iOS or Mac App Store certificate. The "Revoke" button is Grayed out.
通过会员中心,开发者 ID 证书无法撤销,就像 iOS 或 Mac App Store 证书一样。“撤销”按钮变灰。
You can't revoke Developer ID or Pass Type ID certificates using Member Center. Instead, send a request to Apple at [email protected] to revoke these types of certificates.
您不能使用会员中心撤销 Developer ID 或 Pass Type ID 证书。相反,请通过 [email protected] 向 Apple 发送请求以撤销这些类型的证书。
Apple will only revoke these certificates in cases of security, to disable installation of the app on all client machines. I've tried emailing the above address, and they told me they could not revoke the cert.
Apple 只会在安全情况下撤销这些证书,以禁止在所有客户端计算机上安装该应用程序。我已经尝试通过电子邮件发送上述地址,他们告诉我他们无法撤销证书。
The solution, then, is to have additional Developer ID Certificate slots added to your account, past the limit of 5.
然后,解决方案是将额外的开发人员 ID 证书槽添加到您的帐户,超过 5 个的限制。
Product Security told me, rather than revoking the certs,
产品安全告诉我,与其撤销证书,
We encourage you to contact Apple Developer Connection at https://developer.apple.com/support/to resolve the issue you're experiencing.
我们鼓励您通过https://developer.apple.com/support/联系 Apple Developer Connection以解决您遇到的问题。
I've now contacted developer support. I recommend calling. They are currently, hopefully, setting up new Developer ID slots on my dev account.
我现在已经联系了开发人员支持。我建议打电话。他们目前希望在我的开发帐户上设置新的开发人员 ID 插槽。
When you create a new Developer ID Certificate that you will actually use, be sure to back up the Certificate and Private Key so that you do not hit this issue in the future.
创建实际使用的新开发人员 ID 证书时,请务必备书和私钥,以免将来遇到此问题。
EDIT:
编辑:
I waited for over a month, I believe, with no response. I happened to have a ticket to an Apple TV Tech Talkand talked to an Apple representative at their lab. He was able to reset my Developer ID Certificate limit in about 5 minutes. So this is possible, but to expedite the process I would attempt to talk with a Developer Evangelist at Apple either in person or over the phone.
我等了一个多月,我相信,没有任何回应。我碰巧有一张Apple TV 技术讲座的门票,并与他们实验室的 Apple 代表进行了交谈。他能够在大约 5 分钟内重置我的开发人员 ID 证书限制。所以这是可能的,但为了加快这个过程,我会尝试亲自或通过电话与 Apple 的开发人员交流。
回答by bbarnhart
One issue could be the private key is missing for your developer cert. With Keychain Access find your developer cert and verify it has a little triangle beside it. Click on the triangle to reveal the private key.
一个问题可能是您的开发人员证书缺少私钥。使用 Keychain Access 找到您的开发人员证书并验证它旁边是否有一个小三角形。单击三角形以显示私钥。
If it's not there you'll need to restore this private key from the Mac you created your certificate.
如果它不存在,您将需要从您创建证书的 Mac 恢复此私钥。
Otherwise, delete the cert from the Apple Developer website and then create a new one.
否则,从 Apple Developer 网站删除证书,然后创建一个新证书。
回答by Y.Bonafons
Same issue here but i was using "automatically manage settings" on Xcode 8. And for a particular reason there were two distribution certificates in my developer account.
同样的问题,但我在 Xcode 8 上使用“自动管理设置”。出于特殊原因,我的开发人员帐户中有两个分发证书。
Xcode seems to choose the most recent automatically and I didn't have it installed on my mac. So I switch to the old way by creating manually my app ID and my provisioning profile (which use the appropriate certificate) and it works :)
Xcode 似乎会自动选择最新的,而我的 mac 上没有安装它。因此,我通过手动创建我的应用程序 ID 和我的配置文件(使用适当的证书)切换到旧方式,它可以工作:)
回答by Rafy
I ran into this same issue, and I fixed it at last. There are some tips:
我遇到了同样的问题,最后我修复了它。有一些提示:
in Xcode -> Preferences -> Accounts, click button View Details, then click button Download All Profiles
in Keychain Access, check if the certificate exists. if not, choose File->Import items, then choose the .cer file you download from developer website
在 Xcode -> Preferences -> Accounts 中,单击按钮查看详细信息,然后单击按钮下载所有配置文件
在 Keychain Access 中,检查证书是否存在。如果没有,选择File->Import items,然后选择你从开发者网站下载的.cer文件
Hope it helps.
希望能帮助到你。
回答by Dorald
On Xcode Version 8.3.3 go to Preferences ->Accounts -> Manage Certificates -> then click (+) ->on dropdown menu click iOS Development. Do the same for iOS App Store -> Done -> Download All Profiles.
在 Xcode 版本 8.3.3 上,转到首选项 -> 帐户 -> 管理证书 -> 然后单击 (+) -> 在下拉菜单中单击 iOS 开发。对 iOS App Store -> 完成 -> 下载所有配置文件执行相同操作。
回答by Timur Bernikovich
I had similar issue. I've discovered that my provisioning profile was invalid since I've updated iOS Developer certificate. After PP regeneration everything works as expected.
我有类似的问题。我发现我的配置文件无效,因为我更新了 iOS 开发人员证书。PP 再生后,一切都按预期进行。
回答by Vaibhavi
If you have changed the machine Exporting the developer account from old mac and then importing into new mac solves the problem
如果换了机器从旧mac导出开发者账号再导入新mac解决问题