Adam Lee
Adam Lee

Reputation: 25738

What does bundle identifier mean in an iOS project?

When I use command line tool template it has a bundle identifier inside the wizard. What does bundle identifier mean? Is this similar to namespace?

Upvotes: 47

Views: 76621

Answers (3)

FredericK
FredericK

Reputation: 1634

According to Apple docs:

A bundle identifier lets iOS and macOS recognize any updates to your app. Your bundle ID must be registered with Apple and be unique to your app. Bundle IDs are app-type specific (either iOS or macOS). The same bundle ID cannot be used for both iOS and macOS apps.

Edit

Since Xcode 11.4, you can use same bundle identifier for both iOS and macOS app if you want to support universal purchase feature.

From Release Note

Xcode 11.4 supports building and distributing macOS apps as a universal purchase. To distribute your macOS app as a universal purchase, specify the same bundle identifier as your iOS app in the Xcode template assistant when creating a new project. If you have an existing project, edit its bundle identifier in the Project Editor.

Upvotes: 38

selva
selva

Reputation: 809

Adding more points to above answers: provisioning profile, the app’s bundle ID needs to be unique and the project assigned to a team. This id can be set in app's target general tab. To create the default bundle ID, Xcode concatenates the company identifier with the product name you entered when creating the project from a template. The string format should be Uniform Type Identifier(UTI), which is alphanumeric characters (A-Z,a-z,0-9), hyphen (-), and period (.)

Upvotes: 7

CodaFi
CodaFi

Reputation: 43330

The bundle identifier is the unique string that identifies your application to the system. This compares to the display name (namespaces are usually prefixes in frameworks), which is what iOS uses to show the name of your app on the springboard.

Bundle identifiers are usually (not always) written out in reverse DNS notation (I.e com.myCompany.myApp).

Upvotes: 28

Related Questions