Question: "What do you call a variable without a name?" Answer: "An anonymous variable, of course!" Follow-up question: "How do you use an anonymous variable?"
If you blanked out, that's OK. The human mind works by naming things.
We name things to think about them.
We name ideas to talk about them.
We, humans, tend to have difficulties reasoning unnamed things.
Likewise, Apple's platforms need a unique global name for each app. This is called, easy enough, an App ID. In this article, you'll learn two ways to create and manage App IDs, what kinds of App IDs there are, and bonus content on managing App IDs without an Apple device.
What Is an App ID?
An App ID identifies an app across all Apple's platforms. A single App ID can mean an iOS app, an iPadOS app, a macOS app, and even a tvOS app. Furthermore, the App Store requires universal purchase apps to share the same App ID.
An App ID is a string consisting of two parts:
A team identifier declaring which team published the app
A bundle identifier declaring the app bundle's unique identifier
The team identifier is generally associated with the Apple Developer account that uploads the app. However, an enterprise developer account may have more than one team, each with its own team identifier.
The bundle identifier is a string in the reverse domain name notation that uniquely identifies the application bundle. Apple recommends using a prefix corresponding to a domain name controlled by your organization, although there is no strict requirement.
Besides identifying an app in the App Store, an App ID is used to configure push notifications, configure Game Center access, and entitle the app to specific capabilities. That last one would be entitlements ranging from camera access to CloudKit storage to in-app purchases. But what you can do with an App ID is a topic of its own.
App ID Types
There are two types of App IDs:
An explicit App ID
A wildcard App ID
An explicit App ID specifies the team identifier and bundle identifier with no ambiguity. This is the preferred way to register an app in the App Store or link multiplatform apps across all of Apple's operating systems.
A wildcard App ID has an asterisk at its end, grouping apps sharing a common prefix. The downside is that you can't configure push notifications, in-app purchases, iCloud, or Game Center under a wildcard App ID.
An example of a wildcard App ID would look like this:
Thus, the wildcard App ID above could cover applications with the following bundle identifiers:
Whereas explicit App IDs from the same company could look something like the below:
How to Create an App ID
There are two main ways to create an App ID:
Use Xcode to create an App ID.
Use a web browser to create an App ID.
Using Xcode to Create an App ID
Xcode, Apple's preferred software development application, can automatically create App IDs for you based on the app's bundle identifier. To do this, you must authenticate Xcode into your Apple Developer Program (ADP) account and configure the project with your ADP's team identifier.
Log Xcode Into ADP
Follow these steps to authenticate Xcode into your ADP.
Open Xcode Preferences.
Select the Accounts tab.
In the bottom-left corner, click the + button.
In the Select the type of account you want to add dialog, select Apple ID. This should be an Apple ID that is enrolled in ADP.
In the Sign in with your Apple ID dialog, enter your primary email for logging in to your Apple ID. Click Next.
Enter your Apple ID password. Click Next.
You're taken back to the Accounts tab. Your Apple ID is shown.
Create a New Project With a New App ID
Follow these steps to create a new blank project and create an App ID for it.
Open Xcode and choose the menu item File | New | Project…
For this example, let's choose the Multiplatform application template in the Choose a template for your new project dialog. Highlight the Multiplatform tab, select App, and then click Next.
In the Choose options for your new project dialog, specify the following information:
In Organization Identifier, enter your organization's website domain name in reverse domain name notation.
In Product Name, enter a name for the app. This should consist only of letters and numbers and preferably no spaces.
In Team, choose the team that will distribute this app. This will define the Team ID portion of the App ID.
Notice that Xcode will combine the Organization Identifier and the Product Name to form the app's Bundle Identifier. Click Next when ready.
Save the project.
With the project open, select the application target and open the Signing & Capabilities tab.
Ensure the Automatically manage signing checkbox is ticked.
That's it. Try building the app. By the time the app is signed, Xcode should have contacted Apple's servers and ensured there is an App ID that corresponds to the app you've built.
Using a Web Browser to Create an App ID
App IDs are registered as part of your ADP membership. These are accessible through the ADP's account management web application. Accessible via any web browser, you can see all registered App IDs and create new ones. In other words, you can create App IDs using an Android device. (More on that later.)
Follow these steps to use a web browser to create an App ID:
In the Certificates, Identifiers & Profiles screen, select Identifiers.
In the Identifiers screen, ensure that the top-right-corner drop-down shows App IDs. Then click on the + button.
In the Register a new identifier screen, select the App IDs radio button. Then click Continue.
In the Select a type screen, select the App type, then click Continue.
In the Register an App ID screen, enter the following details:
In the App ID Prefix drop-down selection, select the prefix with the Team ID indicator.
In the Description field, enter a short application description.
In the Bundle ID field, choose either Explicit or Wildcard, depending on whether you want to create an explicit or wildcard App ID. Then type the bundle identifier in reverse domain name notation.
Leave the Capabilities and App Services empty for now; you can modify them later.
Click Continue when you're done.
In the Confirm your App ID dialog, click Register.
You're back in the Certificates, Identifiers & Profiles screen. The list of identifiers shows the new App ID you have created.
Creating an Apple ID Without an Apple Device
An Apple ID identifies you to the company and is required by many Apple services. But do you know that you can create an Apple ID without needing an Apple device? Yes, you could create an Apple ID on an Android device without an iPhone.
To create an Apple ID on an Android device or otherwise without an Apple device, you will need the following:
A web browser for creating the Apple ID
A cellular connection for receiving SMS messages
An email address for receiving email verifications
When you have the above items on hand, follow these steps:
Click on the Create Your Apple ID link in the top-right area of the page.
A Create Your Apple ID page will appear. Enter your details and then click Continue when ready. Be sure to match the Apple ID's country/region with the country/region of the cellular number for identity verification.
When the Verify your email address to create your new Apple ID screen appears, open the verification email from Apple and enter the code on the verification screen.
When the Verify your phone number to finish setting up your Apple ID screen appears, find the SMS verification code from Apple and enter it into the verification screen.
When you see the Sign-In and Security screen, you've successfully created the Apple ID account.
App ID Is Not App Store ID
In Apple platforms, an App ID differs from its App Store ID. Apple maintains the link between an App ID and its corresponding App Store ID, if any, in its databases, which is not readily visible externally. Furthermore, some apps are not distributed via the App Store; hence, those may have an App ID but not an App Store ID.
Where Do I Find App ID for Apps?
You can extract the App ID of any application from its application bundle. An easy way to find it is via the codesign tool.
For example, let's run the codesign tool on Microsoft Word's app bundle:
codesign -vvd Microsoft\ Word.app
Then codesign will return the code signing information of Microsoft Word:
Take note of the value of TeamIdentifier and Identifier from codesign's output; these are the team identifier and bundle identifier, respectively, which are components of an App ID. Microsoft Word has UBF8T346G9 as the value of TeamIdentifier and com.microsoft.Word as the value of Identifier. Hence the App ID for Microsoft Word is as follows:
Where to Find App Store ID
You can extract an app's App Store ID from its App Store URL. You can follow these steps to find an app's App Store ID:
Find the app in the App Store.
Click on the Share button to get its deep link URL.
In the URL, find the last path component with a number prefixed by id—the App Store ID.
Let's look at an example. The following is an App Store URL of Microsoft Word for iOS. The App Store ID is 586447913, as visible in the last path component:
You've learned what an App ID is, what it is for, and what types of App IDs are available. You learned two ways to register an App ID. The first way is to register it automatically through Xcode. The second way is to register one manually through Apple's developer account web application.
Registering an App ID requires an Apple ID. Thus, you learned how to create an Apple ID using a web browser without needing an Apple device. Hence, you can create an Apple ID on Android, Windows, and iPhones. You also learned that an App ID differs from an App Store ID and where to find each.
With your new App ID, an Apple ID, and an initial build of your iOS app at hand, you should sign up for a free trial at Waldo. Waldo helps you automate testing for your mobile apps (iOS and Android), so you can create and run reliable automated mobile tests.