mm24
mm24

Reputation: 9586

iTunes connect: confused on Bundle ID

I have been excited to try to add for the FIRST time a new App on iTunes Connect to TEST my GAMEKIT features.

I have read this technical note and I am getting confused because I had already a boundle id for my App that I created when I started developing it (that's my current bundle id with which I created the current provisioning and testing profiles: hello-*).

enter image description here

In order to use GameKit and InApp Purchase should I create a new Bundle Id?

I am confused because:

Any help will be appreciated, in particular I need to solve my first issue: which bundle Id should I use in ordert to use GameKit and InAppPurchase?

Upvotes: 15

Views: 21108

Answers (3)

Roberto Canogar
Roberto Canogar

Reputation: 1614

Before answering your questions some definitions:

Bundle ID: A reverse DNS string that precisely identifies a single app.

Bundle ID search string: it is used to match a set of bundle IDs, where each bundle ID identifies a single app. For example, if the bundle ID search string is com.mycompany.MyApp or a wildcard such as com.mycompany.*, then it will match the bundle ID com.mycompany.MyApp.

App ID: A string that identifies one or more apps from a single team. An App ID consists of a bundle ID search string preceded by the Team ID, a 10-character string generated by Apple to uniquely identify a team. In the technical note that you link it is ABCDE12345 and called the Bundle Seed ID.

(Development) Provisioning Profile: you use it to authorize your app to launch on devices and use certain store technologies when you are in development. It is comprised of: a single App ID, a set of devices, and a set of development certificates. The provisioning profiles are created in Member Center and you need them on your device to run your app. XCode can download provisioning profiles and install them onto devices.

Now I will answer to your bullets:

  • To use Game-Center (GameKit) and IAP you need an explicit App ID, that is and App ID with a bundle ID search string that has no *. A wild-card App ID is one in which the bundle ID search string that has a *, and is the one you have now.
  • What you create initially is an App ID with an associated Bundle ID. If it is explicit you can add Game-Center and IAP, if it is a wildcard App ID not... that's it.
  • You can not have two apps with different names but the same explicit App ID or Bundle ID. But you can have two apps with different names that do not use Game-Center or IAP with a unique App ID using a wildcard App ID.
  • You ask why the wildcard is useful... Well, I said that if you do not use Game-Center or IAP you can have two or more apps associated to an wildcard App ID. Then you can create a provisioning profile with this App ID and you only need to install this provisioning profile on your devices for all your apps. There is a default provisioning profile of this type called the Team Provisioning Profile which is valid for all your apps, but you could create more specific ones that are valid for a subset of all you apps.

This process is really useful for big teams. If you have a small team and few apps it is really confusing, but it helps to understand the reasoning behind it.

But there is more to say about all this. I recommend that you read the "App Distribution Guide" as I did recently. It is an extensive guide, but for the moment you only need to read sections of topic "Maintaining Your Signing Identities and Certificates" and "Maintaining Identifiers, Devices, and Profiles". The guide is very clear, full of screenshots and it will answer all your questions. Also you can go back to the guide down the road to quickly solve some issue (and you will have issues).

The first time that I created an App with Game-Center and IAP more than a year ago I looked up stackoverflow to answer all my questions. But I've been having issues when certificates expired, when I added new devices, etc, and every time I found and Ad-hoc solution after a lot of fiddling around and going back to stackoverflow. Don't get me wrong, there are great answers in stackoverflow but it is a much better strategy in my experience to read something longer that explains the big picture. App ID, Bundle ID's, Certificates, private keys, etc, is a messy subject, specially if you do not understand why it is built this way.

Upvotes: 29

Gianluca Tranchedone
Gianluca Tranchedone

Reputation: 3598

The bundle id is just an identifier for your app. It's mainly used to provide you with the certificates you need to use to sign your app before submitting to the App Store or to use it on development devices (e.g. for testing). The bundle id can be whatever you want. Apple recommends using the syntax com.yourcompany.yourapp to keep it consistent among apps you develop and avoid conflicts with other app's identifiers.

A wildcard can be used on all your apps, while a specific id can be used with one app only. I advice you to have an id for each of your app and only a wildcard for development (so you can run on your devices as many apps as you want without having to bother about the certificates until you decide to ship the app). You don't need to have access to all services (like Game Center or iCloud) on all your apps and therefore you better sign the single certificates just with the services your app needs.

Upvotes: 5

user2050128
user2050128

Reputation: 41

What I think Apple wants is:

  1. Create a different bundle ID for each app that uses in-App purchase/GameKit or both.

  2. You can have same App-ID, and bundle ID for apps that do not use these.

  3. If the bundleID you have for your app is not used for any other of your apps, you can use it.

Somebody more knowledgable, Please correct me if I am wrong.

Upvotes: 2

Related Questions