What does bundle identifier mean in an iOS project?

后端 未结 3 1874
[愿得一人]
[愿得一人] 2021-02-01 14:14

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?

相关标签:
3条回答
  • 2021-02-01 14:45

    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 (.)

    0 讨论(0)
  • 2021-02-01 14:46

    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.

    0 讨论(0)
  • 2021-02-01 14:50

    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).

    0 讨论(0)
提交回复
热议问题