A correction: CFBundleName vs. FRApplianceName 31May07 | 10
So, I’ve mentioned on a number of occasions that the non-localized ‘CFBundleName’ showing up in the main menu can be alleviated through developers adding an FRApplianceName key to their Info.plist. I even explicitly pointed this out on the huge video tutorial — which is being downsized by my good friend (and also my hosting provider, at RGHosting) as I type this, ready to become the start of a proper podcast.
However, there needs to be a little change to this information. It’s technically true, except for a little bug in the implementation, due I would guess to the addition of some layers above the NSBundle API used to fetch the localized string value.
The code used by the BRApplianceManager looks something like this:
locName = [BRLocalizedStringManager localizedStringForKey: @"CFBundleName"
inFile: @"InfoPlist" fromBundle: bundle];
if ( locName != nil )
[dict setObject: locName forKey: @"FRApplianceName"];
The call into BRLocalizedStringManager on the first line can be effectively replaced with the following:
[NSBundle localizedStringForKey: @"CFBundleName"
inFile: @"InfoPlist"
fromBundle: bundle];
…which is in turn the API underlying the NSLocalizedString functions. And you know what those routines do when you haven’t created your localizations yet? That’s right, they return the key.
So, we end up with some code which contains a fallback, but that fallback will never actually be used, because the function called never returns nil.
Oops.
So, I have to apologize for giving out what essentially amounted to misinformation there. Hopefully when Apple delivers the YouTube plugin they can fix this bug too, so we can have a working locale-independent fallback for the plugin name.
While we’re at it, why not make it fall back on the plain ‘CFBundleName’ property?
shrug


