13
votes

Similar question about Bundle Name and Bundle Display Name have been asked, such as:

What's the difference between "bundle display name" and "bundle name" in cocoa application's info plist

but so far I have not read a very good succinct answer on when you need to use them both, when they may be specified differently, and so on.

The documentation seems to suggest that bundle display name is only useful if you have localization and may hurt performance if you specify it when you don't have localization.

Can someone clear these issues once and for all?

Apple's Documentation

CFBundleName (String - iOS, Mac OS X) identifies the short name of the bundle. This name should be less than 16 characters long and be suitable for displaying in the menu bar and the application’s Info window. You can include this key in the InfoPlist.strings file of an appropriate .lproj subdirectory to provide localized values for it. If you localize this key, you should also include the key “CFBundleDisplayName.”

CFBundleDisplayName (String - iOS, Mac OS X) specifies the display name of the bundle. If you support localized names for your bundle, include this key in both your information property list file and in the InfoPlist.strings files of your language subdirectories. If you localize this key, you should also include a localized version of the CFBundleName key.

If you do not intend to localize your bundle, do not include this key in your Info.plist file. Inclusion of this key does not affect the display of the bundle name but does incur a performance penalty to search for localized versions of this key.

Before displaying a localized name for your bundle, the Finder compares the value of this key against the actual name of your bundle in the file system. If the two names match, the Finder proceeds to display the localized name from the appropriate InfoPlist.strings file of your bundle. If the names do not match, the Finder displays the file-system name.

3
Good question, and the good news is Bundle display name will edit the text under the icon and Bundle name won't hurt anything (as far as I can tell!)Ethan Parker
I think the paragraphs you copied from Apple's documentation make it very clear that you only need CFBundleName unless you plan to provide localized strings in which case (and only in this case) you need to also provide CFBundleDisplayName.ukayer

3 Answers

13
votes

CFBundleDisplayName is for changing the text below the app icon on your device (and simulator). Yes this is supposed to be localized but there's no tangible penalty in performance to editing it or making it say whatever you want.

To edit this, you can change the "Bundle display name under "info" in the project:

Location of the Bundle display name attribute

CFBundleName not a clue. I can't figure out what this changes or why.

4
votes

I just found this document at Apples iOS Dev Library: Making the app name displayed on a device consistent with the name in iTunes Connect. The name is a little misleading, but this solved my understanding about the difference between 'Bundle name' and 'Bundle display name' in an instant.

I hope this will help you guys too. :)

1
votes

for iOS (not sure about macOS or watchOS)

CFBundleName - is the fallback if CFBundleDisplayName is not present in the info.plist. Moreover the CFBundleDisplayName is used by Siri.

If you localize CFBundleDisplayName, you must localize CFBundleDisplayName as well.

Here is the apple link for the same - https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-110725