Contents

Changing the bundle identifier

Modify your app’s bundle identifier and update it anywhere it appears.

Overview

If you want to change your app’s bundle ID before you upload a build to App Store Connect, you need to change it in multiple locations. It’s particularly important that you update the bundle ID in all the locations below if your app uses certain capabilities that depend on the bundle ID.

The bundle ID is an information property list key that uniquely identifies your app throughout the system. Some capabilities use information property list or entitlement keys in your project that contain the main bundle ID.

If you refer to a bundle ID in your code, replace it with the bundle() macro that returns the bundle for the calling code.

Change the main bundle ID

First, change the bundle ID in your Xcode project:

  1. In the Project navigator, select the project.

  2. In the project editor on the right, select the target.

  3. Click the Signing & Capabilities tab and if necessary, expand Signing.

  4. In the Bundle Identifier text field, enter your new bundle ID and press Return.

[Image]

Xcode changes the underlying CFBundleIdentifier information property list key that appears in the app bundle.

Update companion target bundle IDs

Change any target bundle IDs that are derived from the main bundle ID, such as, bundle IDs for watchOS, app extension, and app clip targets.

In the project editor, select each target in the sidebar and update its bundle ID in the Bundle Identifier field on the Signing & Capabilities pane on the right.

For watchOS targets, Xcode updates the underlying WKCompanionAppBundleIdentifier and WKAppBundleIdentifier information property list keys.

Change keys that depend on the main bundle ID

Update any other information property list and entitlement keys that contain the main bundle ID.

For example, if you use App Clips, change the associated com.apple.developer.associated-appclip-app-identifiers and Parent Application Identifiers Entitlement keys. If you have an app extension, be sure to change the com.apple.developer.app-migration.data-container-access key too.

Update the bundle ID in App Store Connect

If you plan to distribute your app through the App Store and you’ve created an app record, but haven’t uploaded a build yet, then you can still change the bundle ID in your app record to match your Xcode project. After you change the bundle ID in your Xcode project, to update the bundle ID in your app record in App Store Connect:

  1. Build and run your app on a device to register the new bundle ID and update the provisioning profile.

  2. In App Store Connect, select Apps and then select your app.

  3. In the Distribution pane, select App Information under General in the sidebar.

  4. Choose the new identifier from the Bundle ID pop-up menu under General Information on the right, and click Save.

For more information, see View and edit app information.

Update any other settings in App Store Connect that use the bundle ID, such as in-app purchase settings. Re-request any special entitlements from Apple that require approval. Deleting an existing app record doesn’t make its bundle ID available.

Update manual provisioning profiles

If you use manual provisioning, update the App ID in those provisioning files to match the bundle ID in your project. For more information, see Edit, download, or delete provisioning profiles in Developer Account Help. After you update your provisioning profile in your developer account, you can download it from Xcode > Settings > Accounts, using the Download Manual Profiles button when you select your account.

If you toggle the “Automatically manage signing” checkbox in the Signing & Capabilities pane, Xcode updates your provisioning profiles for you.

See Also

Setup and maintenance