Provisioning Profile Crash Course – Part 2

15. April 2022 Tools, Xcode 0

In the first part of this course I went through the first preparation steps in order to create the provisioning profile, namely that how to create the different certificates, and also how to add the devices that you own. In this post we will get into another important ingredients of “cooking” of the provisioning profiles: The identifiers.

Identifiers

Identifier name

Before jumping into the provisioning profiles, there is another important thing that I need to mention, and those are the identifiers. There is a separate section in the Developer Portal for the Identifiers, alongside with the already introduced Certificates, and the upcoming Profiles. 

So what is an Identifier? In a nutshell it is something that is identified with a unique  identifier in the App Store. One of the most used one identifier is the App ID. Actually there is a bit of a confusion in the used terms about the App ID, (here comes the rant :O) since it is appearing as “App ID” during the identifier creation, then will be shown as “Bundle ID” when you are just opening an existing App identifier, then there is the “SKU” and the “Bundle ID” again in the App page itself, but that Bundle ID says it will be the same as Xcode, and at the end there is the Apple ID (of the App not you), which is actually just a numeric value, and it is another reference to your app. (End of the rant :))

Anyhow, there is the App ID/Bundle ID, which can be generated in the Identifier menu point, and among different type of IDs, we need to use the App ID. 

As I mentioned earlier you need to provide a unique identifier for your App ID, and (I think) historical reasons the reverse domain name notation is used (this is actually recommended by Apple: https://apple.co/3untGwz), which is essentially your domain name in the reversed format. In this case (if you own the domain) your app identifier will be unique. So let’s assume that you own for example the petermolnar.dev domain, your first App ID can be dev.petermolnar.myfirstapp. 

There are few things to keep in mind:

  1. Preferably don’t use your main domain for your first app. Add a uniques identifier at the end of your bundle ID.
  2. App IDs can be only deleted up til the point when there is no App created with them. As soon as you created an App, using the given ID in the App Store, you can’t delete permanently the App, and therefore you can not delete the identifier neither.

Capabilities

There is another concept that we need to mention, and it related both to the App Identifier and your actual Xcode project. Those are the capabilities. The list of capabilities is available on Apple’s site: https://apple.co/3LRu2kR . You might already aware some of the capabilities, like Push notification, but there are other capabilities as well, like Siri support, HealthKit Access and so on. Some of the capabilities require further configuration in the App Store Connect site. 

Why is it important? Because the capabilities needs to be set up on two places: 

  1. App ID needs to have the capability switched on. 
  2. If it is on, and configured, then you can also add it in your Xcode project. 

Unfortunately it is a bit of a split brain situation, since the only way you can figure out that you forgot to add or configure a capability won’t turn out at the time when you are adding it to the Xcode, but you will face errors when you are trying to use a Provisioning profile, which doesn’t have that capability.

Having said that, finally we have arrived to the Provisioning Profiles, which is for the 3rd part of this crash course.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.