Create a Distribution Provisioning Profile

In the last article, you learned how to create an App ID from the Developer Member Center. Now we're going to use that App ID to create a Distribution Provisioning profile to code sign your app. To do that you're going to start by opening Xcode.

 

Launch Xcode 6

To start, we need to generate a Certificate and we can do that inside of Xcode. If you don't already have Xcode 6, you can download it from the Mac App Store. Open up Xcode and go to the Xcode preferences by clicking the top tool bar -> Xcode -> Preferences. Or press ⌘ and comma (,).

 

Add Developer Account to Xcode

Next, click Accounts and the the + button on the bottom left.

 

And click on "Add Apple ID..."

 Enter your Apple Developer account information and press Add.

 

Generate Distribution Certificate

Now click on View Details.

Underneath signing identities click the +.

Then click on iOS distribution. If you want to build on your device before deploying to the App Store, click on iOS Development as well.

 

 

Create the Distribution Provisioning Profile

Now that we have generated our Distribution Certificate, we can generate a Distribution Provisioning Profile from the Developer Member Center. Log back in to the Developer Member Center -> Certificates, Identifiers & Profiles -> Provisioning Profiles and click the + at the top right corner.

 

 

Click on App Store then continue.

 

Select the App ID that you created from the previous article and press continue.

Select Certificate that we created within Xcode and press continue.

Now type in a name for your provisioning profile and press Generate.

 

Where To Go From Here

Now that you've successfully created a Provisioning Profile, you're ready to submit your app to the App Store! But before we can do that, we need to create a new App on iTunes Connect. Click here to see the process of creating an App on iTunes Connect.

Have more questions? Submit a request

5 Comments

  • 0
    Avatar
    roger boerdijk

    You manually create a "Distribution Provisioning Profile" from the developer.apple.com membersite, but the documentation states


    You can easily identify any Xcode-managed provisioning profiles in the Member Center that use an explicit App ID because they will begin with the text “iOS Team Provisioning Profile:” followed by the bundle ID. Xcode 5 requires that you create your own distribution profile in the Member Center. Xcode 6 will create any distribution certificates or distribution provisioning profiles that are required. When Xcode creates a distribution provisioning profile, the name of the distribution provisioning profile begins with the text XC: followed by the App ID. If you are using a wildcard App ID, the name of the distribution provisioning profile is XC:*.
    --- ( see https://developer.apple.com/library/ios/qa/qa1814/_index.html )

    Having it created by XCode is more convenient, because if you change your "Capabilities/Entitlements" it will auto-update the Provisioning profile ( in the other case it gets invalidated and you have to manually edit/refresh it ).

    Question is, when/how to get xcode to create this automatic distribution profile ( I think it creates the development distribution profile the first time you change something in xcode in the 'capabilities' page ).

  • 0
    Avatar
    Murtaza

    From the account preferences, when you click view details there should be a button that says "Download All". This will download all distribution profiles, and development profiles that are tied to your account.

  • 0
    Avatar
    roger boerdijk

    Yes, that's correct - but that's assuming you manually created the distribution provisioning profile - which should not be necessary.
    See the provided link which states "Xcode's automatic provisioning is the preferred way to code sign apps during both development and distribution. " )

    Apple suggests setting the "Provisioning Profile" in XCode to "Automatic". The official documentation states "Xcode 6 will create any distribution certificates or distribution provisioning profiles that are required.".

    My question is "when does that happen"? I suspect it should happen when you Archive and then "Export Mac Application" or "Upload to Appstore" - but even after clicking those I don't get that automatic distribution provisioning profile.

    Advantage if you let XCode do it is that if it gets invalidated ( e.g. because you changed the Capabilities/Entitlements, xcode will also automatically refresh them (and advantage you don't get when you manually create it ).

  • 0
    Avatar
    Murtaza

    Oh ok, I misunderstood the original question then.

    Yeah, we couldn't get the automatic method to work for distribution either. Only for for development. That's why our guide is covering the manual method. We'll update if we can get the right steps for automatic.

    Sorry.

  • 0
    Avatar
    roger boerdijk

    Thanks - at least I'm not the only one with this problem :)

Please sign in to leave a comment.
Powered by Zendesk