BundleID

From Iphone
Jump to: navigation, search

A bundleID is a universe-unique identifier that specifies this particular iTunes App-Store product. Most commonly, there are bundleIDs

From the time it is created, every iOS app project must have a bundleID. More than likely, your developer selected a bundleID when they created the app; when it's time to upload the app, you'll need to know the bundleID, so just ask them. Similarly, bundleIDs for in-app-purchase (IAP) are typically named in a way that associates them with the app in which they are available; your developer can suggest appropriate bundleIDs.

There's no big mystery to bundleID creation, they just have to be unique across the world. A common way to do this is to make everything you do start with com.companyname (substitute your company name -- so mine would start with com.manyfriends) then, when you add something to the end, it just has to be unique for you. That way, if you make an app, iUnicorns, and I make an app, iUnicorns-And-Rainbows, but we both make the app-name "iUnicorns", our bundle ids will be

   com.companyname.iunicorn
   com.manyfriends.iunicorn

Unique, see?

Once you're using the reverse-domain notation (that's what this style of uniquifying is called), then it makes sense to break things into sub-groups via that dot (".") -- so you end up with IDs like this:

    com.companyname.someapp
    com.companyname.someapp.lite
    com.companyname.iunicorn
    com.companyname.iunicorn.lite
    com.companyname.iunicorn.iap.longhorn
    com.companyname.iunicorn.iap.shinyhorn
    com.companyname.iunicorn.lite.iap.longshinyhorn
    etc.

You can select any bundleID you want -- your bundleid could be "test123", but I bet someone already took that one. The "com.companyname" thing makes it unlikely that anyone else took that bundleid. What you do after "com.companyname" is your business but, since this is also how servers are named, programmers tend to think of using the dots to separate servers & server groups or apps and app-groups. Hence, if you ask 100 programmers what to name your various apps & iap things, probably 85 of them would give answers similar to the ones I list above.


IMPORTANT NOTE: The bundleID is what the iTunes App Store uses to determine "this is the same product" for download, update and purchasing purposes.

(Give that a moment to sink in; it's very important!)

Let's imagine that you release an app with com.companyname.someapp as the bundleID.

  • If you update the app and then upload the new binary with the same bundleID, then everyone who already purchased (or got for free) your app will have their existing copy of the app replaced by this new version, once they update in iTunes.
  • If you completely change the app to be nothing like it used to be, but you use the same bundleID, then everyone who already purchased (or got for free) your app will have their existing copy of the app replaced by this new version, once they update in iTunes.
  • If you upload your app to the app store with a different bundleID, folks who bought/downloaded your original app will not get this new app automatically. It will show in the store as a completely different product, even if the you use the same graphics, descriptive text and display-name.