Search code examples
iosapp-storecode-signingtestflight

Confused about certs in provisioning profiles - developer or distribution?


I inherited an old project from long before the days of automatic certs and signing, and I've never figured all of it out. My confusion for today is this:

I have two iOS certificates at Apple, iOS Distribution and iOS Development.

I have one AppID, which has the complete ID of the app in it.

I have two provisioning profiles, Adhoc and Distribution. They are both signed with the same appid and iOS Distribution cert.

Question: is that last part a problem? I don't really understand the difference between the two certs, if any.

If this is a problem, do I need a second appid as well, or can I simply change the cert to use the iOS Development cert and go?


Solution

  • First, some general info about the certificates and provisioning profiles:

    A distribution provisioning profile is for submitting apps to the Appstore. It uses a distribution certificate. Apps that are built with a distribution provisioning profile can only be downloaded from AppStore.

    An Adhoc provision profile also uses a distribution certificate but it is usually used for sending in-production versions of the app to multiple users for testing, or simply for doing in-house Adhoc distribution within a company. Apps that are built with an Adhoc provisioning profile can only run in devices whose UDIDs were added to the provisioning profile during the profile creation process.

    And the answer to your question:

    You don't need two appids. All of your builds will use the same appid. But you will need a separate developer certificate and a developer provisioning profile in order to run the app in your test devices during development. Changing the certificate of a distribution provisioning profile to a developer certificate isn't enough. But of course, when creating the developer provisioning profile, you need to add the UDIDs of your test devices just like you did when creating a Adhoc provision profile. Otherwise your builds won't work in your devices.