Reputation: 1266
In Xcode we use multiple configurations to compile several different apps, with different Bundle IDs and Display Names.
While the "Identity -> Bundle Identifier" correctly shows a greyed-out "" read-only value, this is not the same with the "Identity->Display Name", resulting to a common name for all configurations.
Note that we have added different values on the "Build Settings -> Product Name" property for each configuration, since our Info.plist entry for CFBundleDisplayName is $(PRODUCT_NAME).
We tried to have a blank "Identity->Display Name" and initially this worked (the Name was eventually the one provided by the configuration's "Build Settings -> Product Name").
However, at some point (when switching Schemes we think) the "Identity->Display Name" took again a generic name (the one used for the .app filename) and this caused all the different "Build Settings -> Product Name" values to be replaced by this same generic name.
Is this a bug? What should we do to NOT have the "Identity->Display Name" editable and rather get its value from the configuration values (like the Bundle ID does)?
Note: We also tried all suggestions provided here: Xcode scheme change display name They did not work, see some comments below the answers there.
Upvotes: 10
Views: 2884
Reputation: 738
Update for Xcode 14 and up: you can click the +
icon behind the text input of Display Name
(under Identity
in the General
tab) and set a value for each build configuration.
For older versions of Xcode:
After you have created different build configurations, you can use a user defined setting per build configuration that sets the display name.
In order to do this you need to click on the Build Settings
tab, and in the build settings tab you need to click on the +
icon in the left upper corner and then select Add User-Defined Setting
. A new entry in the user defined settings (at the bottom of the Build Settings
tab) will be created with the name NEW_SETTING
. Rename this to whatever you want, e.g. APP_DISPLAY_NAME
. If you expand this setting (by clicking on the chevron icon to the left of it) you can set a value for each build configuration.
Now go back to the General
tab and for the Display Name
, fill in your user defined setting like so: ${APP_DISPLAY_NAME}
(replace APP_DISPLAY_NAME
with whatever you named your setting) and press enter. Each build config will use the value from the user defined setting as the display name now.
When using a user defined setting as the display name, it is not shown as <Multiple values>
, however it does take its value from the user defined setting. You can see it changing by switching the scheme, cleaning and then switching from the General
tab, and then switching back to the General
tab.
Upvotes: 7