Comments (4)
Apparently the CFBundleDisplayName isn't always defined and doesn't always work, and oddly there's no constant for it, which seems a bit odd.
Any idea where I can find a definitive Apple document stating which I should use under which circumstances?
from irate.
I found this document: http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPInternational/Articles/LocalizingPathnames.html#//apple_ref/doc/uid/20002141-97582-BCIDCGHG
Localizing Your Application Name
If you have a bundled application, you can specify a localized display name for your application. The Finder displays localized bundle names based on the current language settings. Other applications can request your application’s localized name as well and display it as appropriate.
Note: Mac OS X does not support localized names for non-bundled applications.
You specify localized names for your application using the existing bundle localization mechanism. The Resources folder of your application bundle contains one or more language-specific resource directories. (See “Bundle Structures” in Bundle Programming Guide for information about bundle resource directories.) In each of these language-specific directories, you can include an InfoPlist.strings file with a list of localized property-list keys. One of the keys you can include in this file is the CFBundleDisplayName key, whose value you can set to the localized name of your bundle.At all times, Mac OS X prefers user-customized display names over the default and localized names you specify in your bundle. If the on-disk application name is different than the non-localized version of your bundle display name—that is, the name associated with the CFBundleDisplayName key in your Info.plist file—the system assumes the user made the change and returns the customized name. If at some later time, the user changes the application name back to the original name, the system reverts to using the localized values from your application bundle.
Important: If you want your localized display names to appear, you must include the LSHasLocalizedDisplayName key in your application’s Info.plist file, set the type of its value to Boolean, and set the value to true. The functions that access localized display name information check for the existence of this key before retrieving the information.
Probably checking LSHasLocalizedDisplayName
for YES is an option before querying the BundleDisplayName. Or check if nil/empty and fall back to the BundleName.
from irate.
I guess using BundleDisplayName and then falling back to BundleName if it's nil should be safe enough. I'll look at incorporating that in the next build.
from irate.
Fixed in version 1.2.3
from irate.
Related Issues (20)
- iRate will be allowed for iOS 11? HOT 2
- useSKStoreReviewControllerIfAvailable is ignored HOT 4
- Significant event issue? HOT 5
- SKStoreReviewController is not used in manual prompt request HOT 2
- Use `+initialize` instead `+load` to instantiate iRate singleton HOT 3
- Submit button disabled on SKStoreReviewController HOT 4
- Localizations bug with Chinese simplified and traditional
- iOS 11 problem with opening app page in the App Store HOT 20
- Can you add prompt to update on new version available HOT 2
- How should I reset iRate totally?
- iRate Not show HOT 1
- Show Review Alert only if user has not submitted any review?
- ratedThisVersion not set if using SKStoreReviewController? HOT 4
- iOS Swift : Message and Message Title are not working
- iRate Delegates are Not getting Called
- iOS 11 (GM) prompts at launch even though promptAtLaunch set to NO & Submit button fails HOT 8
- Crash when sending `window` message to `UIApplicationDelegate`
- 您好,为什么弃用不维护了啊? HOT 2
- iRate did not prompt for rating because the app was first used less than 10 days ago HOT 1
- SwiftPM Support / swift package init
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irate.