简体   繁体   中英

iOS and XCode: Issue with certificates

I've search the web but couldn't find a solution exactly for my problem. I've created a Development Provisioning Profiles in iOS Provisioning Portal and added it to my iMac. I can successfully deploy applications to my iPhone.

Now I'm trying to deploy the same application from my MacBook Pro. I've installed the profile but gets an error:

XCode could not find a valid private certificate/valid key-pair for this profile in your keychain

I think that I need a private key from my iMac which I have to import to my MacBook Pro. Right? My question is, where can I find that private key?

When you have generated your certificate, Apple requires you to use Keychain Access for generating a certificate signing request (CSR). When you've done this, a private key has been generated in your keychain. You got the error above because you don't have transfered this private key between your Macs.

Here is the guide to do so (the link is for mac, but it's the same manipulation). From your iMac :

  1. Open Keychain Access in the /Applications/Utilities folder.

  2. Select the signing certificates you want to export.

  3. Choose File > Export items.

  4. Choose Personal Information Exchange (.p12) as the file format and click Save.

  5. Enter a password and click OK when done.

Transfer the p12 on your macbook, and :

  • Double-click the exported file that has a .p12 extension.

Extracted from :

http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/OSXWorkflowGuide/CodeSigning/CodeSigning.html#//apple_ref/doc/uid/TP40011201-CH7-SW17

撤消当前证书,然后在创建新证书时遵循有关钥匙串访问的提示,然后应该可以。

You can still use your keychain to create the CSR, and then upload it on the new provisioning portal. Just did it the other day.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM