The default bundle ID in your Xcode project is a string formatted as a reverse-domain—for example, com.MyCompany.MyProductName
. To create the default bundle ID, Xcode concatenates the organization identifier with the product name you entered when creating the project from a template, as described in Setting Properties When Creating Your Xcode Project. (Xcode replaces spaces in the product name to create the default bundle ID.) It may be sufficient to replace the organization identifier prefix in the bundle ID, or you can replace the entire bundle ID. For example, change the organization identifier prefix to match your organization domain name, or replace the entire bundle ID to match an explicit App ID.
For tvOS apps that share the iTunes Connect app record of an iOS app (described in Adding a tvOS App to an iOS App Record), the tvOS app must have the same bundle ID as the iOS app.
For watchOS apps, the embedded WatchKit app and WatchKit extension targets must have the same bundle ID prefix as the iOS target. The WatchKit app target must have the format [Bundle ID].watchkitapp
and the WatchKit extension target must have the format [Bundle ID].watchkitextension
. If you change the iOS app’s bundle ID, you must change the WatchKit app and WatchKit extension target’s bundle ID to match.
For Mac apps, ensure that every bundle ID is unique within your app bundle. For example, if your app bundle includes a helper app, make sure that its bundle ID is different from your app’s bundle ID.
Follow these steps to change the bundle ID prefix in the General pane in the project editor.
To set the bundle ID prefix
-
In the project navigator, select the project and your target to display the project editor.
-
Click General and, if necessary, click the disclosure triangle next to Identity to reveal the settings.