Create distribution profile from .p12 certificate iOS - ios

I have received a .p12 certificate from my Client. I have installed it to my KeyChain. I need to create a distribution provisioning using this and sign my app ipa with it.
How can I create the distribution profile using this information? Any help is appreciated

You cannot create a distribution profile from a certificate and private key. The provisioning profiles are created on Apple's developer site and must reference one or more certificate to be used with the profile.
You will need to either need to have the account owner create / download the profile from the developer site and send it to you, or grant you access as an admin on their team. Also, before you request the iOS distribution profile from your client, make sure you also check that the .p12 file that was sent contains the certificate and the private key for the cert. Without the private key, you won't be able to sign, even if you get the profile.
The 4 key pieces of code signing for iOS are the certificate, the private key for the certificate, the provisioning profile, and the entitlements. If you are missing any of these, or if they are out of sync, you will run into problems. The private key is exactly what it says - private. Apple does not have, nor does it want to store the private key. That is kept by the app owner. Apple will generate and allow you to download your certificate based off that private key (you share with them a cert signing request to generate the cert off of your key). Similarly, you can generate / download existing provisioning profiles from Apple's dev site. Finally, the entitlements in your app must match the entitlements granted on your profile. Those are assigned to your app, and the application's project settings requests access to services - this much match what is requested as part of the app ID / profile on Apple's dev site. So those are the key components; from your question, hopefully you can get your client to send you the provisioning profile. Also, you could potentially run into problems with out of sync entitements, if you need to do anything with additional services, like iCloud, if the client hasn't configured those properly for you.

Related

Apple App Store certificates from clients

I'm still struggeling with Apple App-Store Certification for iOS Apps.
Now I have a client who has his own developer account, but I'm developing for him and doing all the stuff. I have a separate developer Account on my own. The Client authorized my account on Itunes Connect, as App Manager.
He created a Distribution Certificate, an App Id and a Provisioning Profile for the App ID and sent the certificate and the Profile to me. I included it in the keychain and can now select those in XCode.
But XCODE says: the provisioning Profile "doesn't include any certificate for which the private key is installed in keychain."
What am I missing? Do I need the private key of the clients? Or is there an other way to do this?
Any Help would be appreciated
You have two options:
1) Ask your client to export developer certificate from keychain(.p12) and share it with you.
2) You have to create a new developer certificates(By removing old one from keychain) by upload a new CSR certificate so the private key will be installed in your system.
if issue is with both(Developer and Distribution)certificate you need both to be exported from your client machine.
You need both certificate and private key (.p12). Ask your client to export the private key and shared it with you. Once you got the private key, install it in your system and you are good to go. Follow this tutorial to export the private key.
https://www.ironpaper.com/webintel/articles/how-to-share-an-ios-distribution-certificate/
Make sure your client export the private key of distribution certificate.

Apple iOS distribution certificate has a new private key after reset

I used XCode to download certificates after regenerating them. I noticed the distribution certificate didn't have a private key in the key chain. I saw that XCode now has a "reset" button so I used that. The new certificate has a private key but with a different name. It still worked though and allowed me to export and install an adhoc app. Also we have two dev teams, could this be the other teams private key?
When the certificate is first requested, the private key is generated and saved in the keychain on the Mac used to generate the request. Only this Mac will be able to actually sign the apps. As in your case, if you have more than one developer authorised to sign apps for distribution using this certificate, you'll need to export the private key from the original requesting machine, and import it into the keychain of other developers.
If you use the 'reset' button, it will revoke the existing certificate and issue a new certificate signing request from your Mac. This will also invalidate all provisioning profiles in the developer account that are tied to the previous certificate. Existing apps already in the iOS app store will be OK, but you will need to regenerate the provisioning profile with the new certificate for any new app signing.

How about Apple’s enterprise distribution iOS apps

I have a iOS app use the account A.
My client gave me an enterprise account B for In-House distribution.
I'm not allowed to revoke their existing certificates and they do not provide .p12 and .developerprofile.
I called the apple center and they told me NO .P12 key can also publish procedures but did not told me how to do.
My E-mail have joined the team,
I create a new app id and a provisioning profiles but the provisioning profiles is error in my Xcode.
error message:The private key for "XXX" is not installed on this Mac.
My question:
I just want to release .ipa for in-house type how to do?
thx!
You will need to p12 (private key) form the client or revoke the current profile. There is not other option. Do not revoke any provisioning profiles for current apps since they may used.
Also explain to the client what you are doing and the consequences that it may have, if they are not able to provide you with the necessary certificates.
You generate a Certificate Sign Request (CSR) from your Keychain, login to your developer account and choose your client's team.
You then create an enterprise certificate which will have to be approved by your client's team manager. Once that is done you will be able to download it and install it on your keychain.
After that generate a provisioning profile for the app you want to distribute, download and install it on Xcode.
Build your app with this certificate and save the IPA for enterprise distribution.

New iOS team member: no valid signing identity

This is getting frustrating. I have two identities, one old, one new, and the latter should be used to deploy iOS apps to the App Store.
I've created the new user, granted him admin access, then I created the app name and provisioning profiles. However, in the Organizer I see that the Dev provision works flawlessly, while the Deploy profile shows me the dreaded error:
Valid signing identity not found.
How can it be?
Well, I see that in the Certificates section in the iOS Provisioning Portal, there is only one distribution certificate, the one belonging to my company.
Is there a way to enable the new user to create apps without accessing the uberadmin's Xcode?
Thanks & Cheers!
You need the key that was used to create the Distribution Certificate for your company.
Remember when you created your developer certificate? Then you went to keychain -> certificate assistant -> Request a certificate from ...
When you did this, your Mac paired your certificate request to a key in your keychain. Once your developer certificate was processed and you downloaded it to your computer, it could be accessed by your computer through that key.
But if you did not create the Distribution Certificate that your company has, you don't have the key on your computer.
Take a look at your certificates in keychain:
Go to 'Certificates' and expand your developer certificate - it will have a little key with your name.
Now try to expand your distribution certificate - it will not have a key, right?
If this is the case, you have two options:
Ask the person who created the Distribution Certificate to export it from his keychain. This will create a file that includes both certificate and key.
Delete the current Distribution Certificate, and create a new Certificate Signing Request from your computer, which will connect it to a key that you have.
First method require access to "Uberadmins" computer. The second require admin access to your teams Apple account. There is usually no downside in using method 2, because creating a new certificate is necessary from time to time anyway. It will not affect already published apps, just coming releases and updates need to use a the latest certificate.
Once all this is done, you need to create a distribution provisioning profile for App Store and connect to the Distribution Certificate that you are going to use. (if you went with option 1, you might already have done this).
Download the profile to your computer, install it, and then in your app, select to build with this profile for distribution builds.
According to Apple's documentation:
A team’s distribution certificate allows a developer to build an app for distribution. If your team wants to use another Mac to create a distribution build, you need to transfer a copy of the distribution certificate as described in, “Safeguarding and Transferring Your Signing and Provisioning Assets” in Tools Workflow Guide for iOS. (from Managing a Distribution Certificate)
So, in order to have multiple users able to create & submit App Store builds, you must share a private key between them.
Create a new private key for the team, and then send that private key to everyone who needs it. Follow the instructions under Generating a Certificate Signing Request with Keychain Access.
See also: Any concern to share private key for distribution certificate among different group under a team account in itune provisioning portal

Profile doesn't match any valid certificate/private-key pair in the default keychain

I am developing an application for a company, they gave me the admin role so I can edit provisioning files. I am getting "Valid signing identity not found for distribution file" and "Profile doesn't match any valid certificate/private-key pair in the default keychain" error on XCode, normally I would revoke the distribution profile by creating a key chain from my mac, but the company have other applications and I can not risk revoking it because clicking revoke gives the following warning.
"Revoking this certificate may invalidate one or more Provisioning Profiles in the Program Portal. Provisioning Profiles already installed on devices will continue to run until the provisioning profile expires."
Is there a way to add a new key pair without revoking the distribution certificate, would revoking the current certificate effect other applications or are there any other solutions to this problem?
You need the private key associated with the distribution certificate.
Request the person who created the distribution certificate for the company for the private key associated with the distribution certificate. Get him to export the private key from his keychain! Ask him to remember to select both the distribution certificate and private key together before right clicking and exporting it as .p12 Select both the distribution certificate and private key together before right clicking and exporting it as .p12
Once you open the .p12 it should pair up with the distribution certificate (the .cer file you should already have in your keychain). Your provisioning profile should work fine then!
Let me know if it works!
I came across the same issue and for some bizarre reason the method clearwater82 suggested didn't work.
But I found out this documentation on apple developer site. Might be helpful for someone else. It's just two simple steps.
FIRST STEP : Exporting Your Code Signing Assets to Your File System
SECOND STEP : Importing Your Code Signing Assets from Your File System
Hope this helps someone!

Resources