MihaiBC
MihaiBC

Reputation: 502

Different bundle identifier for different schemes

I am building an iOS application and I want to set different bundle identifiers for different schemes in Xcode 10. Where do I find that setting?

Upvotes: 4

Views: 5501

Answers (3)

TimTwoToes
TimTwoToes

Reputation: 711

You could create a user defined setting in the "Build Settings" on your target. Create a setting called "CustomBundleIdentifier" or whatever you like. There you can define a bundle identifier for each of your configurations (Release, Debug). Then in your Info.plist, you swap the Bundle Identifier key with $(CustomBundleIdentifier).

Upvotes: 0

Maxim Aba
Maxim Aba

Reputation: 89

The Bundle Identifier relates to the Target. So first you create a new Target, then change its Bundle ID. Target 1 Target 2

Upvotes: 5

Rengers
Rengers

Reputation: 15218

Bundle identifiers are not linked to schemes directly. You need to create separate configurations in Xcode, and then update your schemes to use the appropriate configuration.

You can create configurations by selecting your project in the Project navigator, and then going to the Info tab. Here you will see a list of Configurations, where you can duplicate existing ones.

After you create a new configuration, you can go to the build settings of your target and look for the Info.plist File entry under Packaging. Select a different plist file. Then edit the corresponding plist files to include a different bundle id.

Upvotes: 0

Related Questions