Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bundle Name and Bundle Display Name

Tags:

xcode

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.

like image 256
Boon Avatar asked Mar 12 '12 13:03

Boon


2 Answers

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.

like image 162
Ethan Parker Avatar answered Sep 29 '22 11:09

Ethan Parker


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. :)

like image 38
DevAndArtist Avatar answered Sep 29 '22 09:09

DevAndArtist