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

87,284

Solution 1

I don't think any of the other answers concisely answers the question.

  • CFBundleDisplayName - displayed: below icon. According to docs, should be localized, but only if the app itself is localized, otherwise there will be some kind of penalty (if this is true in reality I cannot say)

  • CFBundleName - displayed: I have no idea. Docs suggest that it will be used in lists thus recommended max 16 characters, but for instance the Settings→General→Usage list of apps uses CFBundleDisplayName really. To date I have never figured out where exactly this one is used.

Oh, this is for iOS apps, can't speak for other OSes.

Solution 2

thanks for Wevah's answer. here is the descriptions for people who confused with this two constants.

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.

For more information about display names in Mac OS X, see File System Overview.


CFBundleName

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.

Solution 3

a busy cat

According to Apple,

Bundle display name :

The app name displayed on the iPhone home screen comes from the CFBundleDisplayName (or "Bundle display name" as the human-readable string in Xcode) entry of your iOS app’s Info.plist

Similarly, the app name you see in your WatchKit app's launch screen and notifications comes from the CFBundleDisplayName of your WatchKit app's Info.plist

Bundle name:

The Apple Watch app on the iPhone currently uses the bundle name (not the bundle display name) of your iOS app, which is specified by the CFBundleName (or "Bundle name") entry of its Info.plist

You can see other related screenshots and reach more info at Apple Developer page by clicking here.

Solution 4

From my experience:

  • CFBundleDisplayName is used in the grid of apps on iOS devices
  • CFBundleName is used in the list of apps stored in iTunes library

Solution 5

Only if Bundle Display Name (CFBundleDisplayName) is not specified, value of Bundle Name (CFBundleName) will be used to displayed under App Icon.

Please note that CFBundleDisplayName is localizable, and it should be used to set the App name shown in iOS Springboard menu & Mac OS X Applications / Mission Control.

In short, don't touch CFBundleName and leave its value as default, i.e. ${PRODUCT_NAME}.

Share:
87,284
xhan
Author by

xhan

wtf? that's cool

Updated on July 08, 2022

Comments

  • xhan
    xhan almost 2 years

    Here is a good question:

    Bundle Name, Executable Name, Product Name...anything else?

    but I just wonder about the difference between "bundle display name" and "bundle name" in cocoa application's info plist.

  • Justin Russell
    Justin Russell almost 11 years
    CFBundleDisplayName is also what displays as the title of notifications (in Notification Center, on the lock screen, etc.).
  • Ethan Parker
    Ethan Parker over 10 years
    What is the "menu bar and the application's Info window" ??? - Is this referring to something in Xcode, the simulator, or an iOS device? @xhan - any help?
  • Chris Page
    Chris Page about 10 years
    @BeemerFan it’s referring to the OS X menu bar. xhan has quoted Apple's documentation, and if you’ll notice, it says "iOS, Mac OS X”, so it applies to both (and some of the details are platform-specific, obviously).
  • Duck
    Duck almost 10 years
    Just Apple to make a simple thing complex.
  • badweasel
    badweasel over 9 years
    how did a "I have no idea" answer get a checkmark and up votes?
  • Jonny
    Jonny over 9 years
    My point is that no one seems to know where it is used, no one has yet answered. If you do know the answer, feel free to add it by tapping "Add Another Answer".
  • unom
    unom over 9 years
    CFBundleDisplayName is also used in the iTunes File Sharing Feature. If left black the app will not display in the iTunes list even though the feature is enabled.
  • Admin
    Admin over 9 years
    This seems right, Google Hangouts has a short display name and an obnoxiously long spam-like iTunes library name.
  • kelin
    kelin over 9 years
    I suppose that CFBundleName is name of app folder or "bundle" where everything is stored.
  • saveknut
    saveknut almost 9 years
    CFBundleName also appears if you get an error message installing an app, such as "(CFBundleName) could not be installed at this time".
  • LaborEtArs
    LaborEtArs over 8 years
    Of late the CFBundleName content is used e.g. in the WatchKitSettings. This might be an example for the mentioned 'list usage'.
  • abhimuralidharan
    abhimuralidharan over 8 years
    THe CFBundleName by default is given as $(PRODUCT_NAME) in the info.plist file.Do I have to edit it or it will take the apps name by default?
  • tylermilner
    tylermilner almost 8 years
    Just to cite the source, here is the information on CFBundleDisplayName from Apple's docs: developer.apple.com/library/ios/documentation/General/Refere‌​nce/…
  • binarydreams
    binarydreams almost 8 years
    I can't help but wonder: if you're going to go to the trouble of taking a screenshot to show that how the values are used, would it not have been better to give them different values so they appear differently?
  • defiant
    defiant over 5 years
    It is wrong to say that do not include this key unless plan on localizing. Apple document says you have to include this key because Siri uses it. developer.apple.com/library/archive/documentation/General/…
  • Dave Hubbard
    Dave Hubbard almost 5 years
    It appears that Apple now requires CFBundleDisplayName as of at least 2019-06-28, or somewhere recently. You get an invalid binary rejection now.
  • Steve G.
    Steve G. almost 3 years
    I found a usage! CFBundleName is displayed at least in sign-in notifications: <CFBundleName> Wants to Use <Service> to Sign In"