简体   繁体   English

Xcode:如何导出开发人员配置文件以便将其导入另一台 Mac

[英]Xcode: How to export a developer profile in order to import it on another Mac

I need to export my developer profile from my old Mac and import it on another Mac because I'm getting the following error:我需要从旧 Mac 导出我的开发人员配置文件并将其导入另一台 Mac,因为我收到以下错误:

Your account already has a valid iOS Development certificate您的帐户已有有效的 iOS 开发证书

I found out that I can export it from here:我发现我可以从这里导出它: 在此处输入图片说明

But on my mac I have 2 accounts there, if I click export accounts do I export both of them?但是在我的 mac 上,我有 2 个帐户,如果我单击导出帐户,我是否同时导出它们? Because I just need one account.因为我只需要一个账号。 Is there any other solution?还有其他解决方案吗? Like exporting the private key used to sign the iOS Development certificate and import it on the new Mac?像导出用于签署iOS开发证书的私钥并在新Mac上导入?

I'd recommend not using Xcode's export option, but instead to go into your Keychain Access.app, and copy the key/cert manually.我建议不要使用 Xcode 的导出选项,而是进入您的 Keychain Access.app,并手动复制密钥/证书。

To do so, in Keychain Access, create a new keychain (by default it will be stored in ~/Library/Keychains ).为此,在 Keychain Access 中,创建一个新的钥匙串(默认情况下它将存储在~/Library/Keychains )。 Select your login keychain, and then My Certificates under Category .选择您的login钥匙串,然后选择“ Category下的“ My Certificates ”。 You should now see your certificate in the right panel.您现在应该在右侧面板中看到您的证书。 It should have a disclosure arrow on the left side, and toggling that should show you your private key.它的左侧应该有一个披露箭头,切换时应该会显示您的私钥。 Select the certificate, and copy/paste it into your new keychain (don't drag it, or it will remove it from your login keychain).选择证书,然后将其复制/粘贴到您的新钥匙串中(不要拖动它,否则会将其从您的login钥匙串中删除)。

Now you can copy that keychain to your new computer, open it in Keychain Access.app and copy the key/cert to your login keychain there.现在您可以将该钥匙串复制到您的新计算机,在 Keychain Access.app 中打开它并将密钥/证书复制到您的login钥匙串中。

And the reason I don't recommend using Xcode for this, is exactly what you mention, that it exports all accounts.我不建议为此使用 Xcode 的原因正是您提到的,它导出所有帐户。 I've had clients in the past send me 'their developer key/cert' exported in this manner, that included the key/cert for dozens of other developers in their company.我过去曾有客户向我发送以这种方式导出的“他们的开发人员密钥/证书”,其中包括他们公司中数十名其他开发人员的密钥/证书。

The way I solved it was to:我解决的方法是:

  1. export all accounts as your personal backup (good to have in a secure place anyway, in case you lose your machine)导出所有帐户作为您的个人备份(无论如何最好将其放在安全的地方,以防您丢失机器)
  2. delete all developer accounts in Xcode Accounts manager (Xcode - Preferences - Accounts) except for the account you want to share with your team删除 Xcode Accounts manager (Xcode - Preferences - Accounts) 中的所有开发者帐户,除了要与团队共享的帐户
  3. repeat the same backup/delete_all_but procedure in Xcode Keychain app for "my certificates" (not 100% sure this is necessary, but doesn't hurt)在 Xcode Keychain 应用程序中为“我的证书”重复相同的backup/delete_all_but过程(不是 100% 确定这是必要的,但不会造成伤害)
  4. export the remaining developer account(s) from Xcode Accounts manager and share it with your team从 Xcode 帐户管理器导出剩余的开发者帐户并与您的团队共享
  5. import your backup to have everything on your machine again (and delete duplicates if necessary).导入您的备份以再次将所有内容保存在您的机器上(并在必要时删除重复项)。 You might have to log in to your Apple ID again from the Xcode Accounts manager您可能需要从 Xcode 帐户管理器再次登录您的 Apple ID

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 xcode配置文件中有多个开发人员帐户时,如何导出一个开发人员帐户 - How to export one developer account when there are multiple developer accounts in a xcode profile 将开发人员资料导入xcode:证书灰显 - Import Developer profile into xcode: certificates greyed out Xcode 导出 Mac 应用程序,无需开发人员程序 - Xcode Export Mac App without Developer Program Xcode:将快照导出到另一台Mac - Xcode: export snapshots to another Mac 不提供配置文件的iOS 9 XCode导出-开发人员部署/临时 - iOS 9 XCode Export without Provisioning Profile - Developer Deployment/Adhoc 在同一个xcode项目上与另一个开发人员合作,配置配置文件问题 - Work with another developer on same xcode project, provisioning profile issue 为了摆脱Xcode中的错误,我需要在Xcode或开发人员资料中进行哪些更改? - What do I need to change in Xcode or in my Developer profile in order to get rid of the error in Xcode? 适用于Mac 10.6.7的Xcode(开发人员工具) - Xcode (developer tools) for Mac 10.6.7 Xcode,如何检索开发人员ID以在Mac Store之外分发? - Xcode, how to retrieve developer ID for distribution outside mac store? 如何访问另一个应用程序的iCloud容器(使用另一个开发人员配置文件和在该配置文件中创建的icloud容器开发的应用程序)? - How to Access iCloud container of another application (App developed using another developer profile and icloud container created in that profile)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM