Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build iOS app using 3rd party distribution provisioning profile

I developed an iOS app that my client is going to use internally. They sent me their enterprise distribution provisioning profile. When I add it to XCode it says "Valid signing identity not found". How do I build the app so that my client can run it on their devices?

like image 665
andr111 Avatar asked Feb 12 '13 16:02

andr111


2 Answers

Your computer is unable to sign with the distribution profile, since you don't have the private key for this certificate.

Alternative 1

Apple intends that building a project for distribution will only take place on a single machine - the machine that the certificate was originally created on. So, in their eyes, you should ask your clients to build the project internally (for distribution only - for development you should have no problems building yourself).

Alternative 2

There is a way to override it.. and it involves exporting the private key from that special distribution machine and emailing it to you.

These are the steps (also outlined here):

  1. Access the computer where the certificate was created, open the "Keychain Access" program on the computer
  2. In "Category" panel, select "Certificates"
  3. Find the correct distribution certificate and expand it
  4. Highlight both the iPhone distribution certificate line and the private key line under it.
  5. Right click and select "Export 2 items"
  6. Save the .p12 file, choose a password that can share, you will need it to import this file later
  7. Email the saved file to you

Once you import this and type in the password from step 6, you will have the private key on your computer too and all will be good.

Alternative 3

There's a chance that when you ask your clients to export the private key, they will have no idea what you're talking about and no idea where the machine that created it is (this is what actually happened to me). This is usually the case if they are not regularly building for distribution on their own.

In this case, you can simply delete the certificate and create a new one (for the distribution profile). If you create the certificate on your machine, then you will have the private key. You should also export it to them just in case (using the same steps of alternative 2).. so they have the ability to build without you if need be.

like image 84
talkol Avatar answered Nov 14 '22 23:11

talkol


Each provisioning profile is paired with a certificate. If you subscribe to the Apple developer service, you should have access to create and download a development cert (tied to the apple ID) and a distribution cert (tied to the organization). The enterprise distribution provisioning profile needs to be paired with the distribution cert. So in order to use their provisioning profile, you will have to get the distribution certificate from them. This will also involve you getting their private key, which they might not be so fond of. Alternatively, they can set you up as a developer on their portal, then you can distribute through the machine that already has the distribution cert installed on it.

like image 34
jdb1a1 Avatar answered Nov 15 '22 00:11

jdb1a1