Cross platform app's bundle identifiers

If I'm making an app that'a cross platform between macOS, tvOS, iOS, and watchOS what would be the best naming convention for the bundle identifiers. I'm currently using com.company.projectname.platform So for example: com.apple.garageband.iOS However I'm wondering if each platform should have the same bundle identifier? So would I just use com.apple.garageband for each platform? Does it matter? Thanks, Kevin

Answered by QuinceyMorris in 188725022

It used to be (don't know the current status) that you could not use the same bundle ID for macOS and iOS applications, even though they're in different app stores. So I would use the .mac and .ios convention for the two platforms. If you want to include your tvOS app in the purchase of your regular iOS app (that is, as a platform variant in the iTunes Connect application record), you must use the same bundle ID as the iOS app. (If you sell the tvOS app separately, you should use a different bundle ID.) I don't know the rules for watchOS, but again I would tend to use a unique bundle ID unless iTunes Connect requires the same bundle ID for your particular configuration.


The other thing to keep in mind is that you might want to use an application group too, so that (for example) the macOS and iOS can share iCloud Keychain settings. You can have, but don't need, an additional bundle ID for the group. I ended up using the .ios bundle ID for this.

Accepted Answer

It used to be (don't know the current status) that you could not use the same bundle ID for macOS and iOS applications, even though they're in different app stores. So I would use the .mac and .ios convention for the two platforms. If you want to include your tvOS app in the purchase of your regular iOS app (that is, as a platform variant in the iTunes Connect application record), you must use the same bundle ID as the iOS app. (If you sell the tvOS app separately, you should use a different bundle ID.) I don't know the rules for watchOS, but again I would tend to use a unique bundle ID unless iTunes Connect requires the same bundle ID for your particular configuration.


The other thing to keep in mind is that you might want to use an application group too, so that (for example) the macOS and iOS can share iCloud Keychain settings. You can have, but don't need, an additional bundle ID for the group. I ended up using the .ios bundle ID for this.

Thanks

This helped me too

Thank you
Apple now allows you to use a single bundle ID for Mac and iOS apps through Universal Purchase:

Universal Purchase for Mac Apps Now Available

The macOS version of your app can now be included in a universal purchase, allowing customers to enjoy your app and in‑app purchases across iOS, iPadOS, macOS, watchOS, and tvOS by purchasing only once. Get started by using a single bundle ID for your apps in Xcode and setting up your app record for universal purchase in App Store Connect.
https://developer.apple.com/news/?id=03232020b

Offering Universal Purchase

Upload your apps to the app record using a single bundle ID. While the bundle ID must match the bundle ID you enter in App Store Connect, the apps can have different version numbers and build strings.
https://developer.apple.com/support/universal-purchase/

See Apple documentation at this link:

https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleidentifier

This reads: "For watchOS apps that have a companion iOS app in the same project, the embedded WatchKit app and WatchKit extension targets must have the same bundle ID prefix as the iOS app. The WatchKit app must have the format [Bundle ID].watchkitapp, and the WatchKit extension must have the format [Bundle ID].watchkitextension."

Cross platform app's bundle identifiers
 
 
Q