-->

iOS Release IPA using someone else's .p12 & .m

2020-06-23 07:50发布

问题:

I'm trying to build & release an IPA and sign it with someone else's (The customer) .p12 file and a .mobileprovision.

What I do not have is their apple developer account user and password combination (I only have my own user and password which are not related).

How can I build and release it using their certificate which I mentioned before (enterprise distribution)?

I'm using Xcode Version 5.1.1 (5B1008)

I have imported the p12 file, and it appears to be fine and visible in keychain. In Xcode, I have set the correct bundle id, and under "Code Signing"->"Release" I have chosen their imported certificate with came with the p12 file ("iPhone Distribution: xxxx"). But when I click Product>Archive, build fails with message '.... no provisioning profile matching the identity "iPhone Distribution: xxxx" was found.' (I put the xxxx there for anonymity).

Note- Before I'm flamed with "Possible duplicate of..." comments, please know that I have looked into other questions and could not find a working solution.

Thanks.

回答1:

You have to import the .p12 and the related provisioning profile properly.

  • Delete your existing certificate from Keychain. Open Keychain Access Manager. Navigate to File > Import Items.

  • Browse to the .p12 or .pfx file that you want to import and open it.

  • Select System in the Keychain drop-down and click Add.

  • Enter the admin password (if Asked) to authorize the changes.

  • Enter the password that created by customer when he generated the .p12 file and click Modify Keychain.

  • Next, Remove your old provisioning profile and get & add the .p12 related provisioning profile.

  • In Xcode, Under Target-->Build settings-->provisioning profiles, select the correct provisioning profile from the pull-down menu. Make sure that you are not doing it under the project section instead of Target.

Hope this will work fine.