Is there a way of specifying unicode characters for the BUNDLE_DISPLAY_NAME in an .xcconfig?

The BUNDLE_DISPLAY_NAME of my app changes (between Testing, Staging, Production) so that it's obvious to testers etc. which varian they are using.

The name contains unicode space to ensure the OS doesn't apply kerning to the spacing within the app name. If this is put directly into the info.plist then on the iPhone desktop it's displayed as desired i.e. if the info.plist contains

My Application Name

Then on the iPhone desktop it displays as:

My Application Name

However if the name is defined in an .xcconfig file as

BUNDLE_DISPLAY_NAME = Xfinity Call Guard

And the info.plist contains $(BUNDLE_DISPLAY_NAME)

Then the name is displayed on the iPhone desktop as My Application N....

Is there a way to specify the name with the unicode characters within an .xcconfig and get that to appear as spaces on the desktop?

Answered by Scott in 820935022

Just enter the desired character directly in the xcconfig file. The XML character reference ߒ isn’t needed since an xcconfig file isn’t XML. It’s just a text file encoded in UTF-8 so just about any character should work.

Also note that you can enter this directly in the Info.plist file too. The XML character reference syntax is fine of course (and improves readability in this case) but isn’t needed in most cases.

Accepted Answer

Just enter the desired character directly in the xcconfig file. The XML character reference ߒ isn’t needed since an xcconfig file isn’t XML. It’s just a text file encoded in UTF-8 so just about any character should work.

Also note that you can enter this directly in the Info.plist file too. The XML character reference syntax is fine of course (and improves readability in this case) but isn’t needed in most cases.

@Scott Hello. Do you know how to enter a character such as this directly into the xcconfig file?

UPDATED - found out how to enter unicode characters on a Mac: Go to System Settings/Keyboard, on the lhs click + and add Unicode Hex Input. Then in the Mac's tool bar at the top switch the keyboard to Unicode, then click Option + the unicode code i.e. in my case Option+2002.

The key is to switch to the Unicode input keyboard first.

Is there a way of specifying unicode characters for the BUNDLE_DISPLAY_NAME in an .xcconfig?
 
 
Q