I am implementing localization function for my app, and everything works fine except the app display name under the icon. My info.Plist is as:
I tried to remove the Bundle display nmae and bundle name and it also did not work.
My localization string file is like:
Anyone can help me with this? I have no idea what I did wrong, thank you.
To localize the app name you should create a InfoPlist.Strings file as apple explains here in "Localizing the Information Property List Files" section. Then you just need to define the keys CFBundleDisplayName and CFBundleName as you already are doing.
Related
I am facing very strange issue. I am not able to change application display name. and unfortunately installed application name has .ipa extension which is bundle name Here is Screen shot of plist (if you need code then i can edit and put it screen shot is easy to see)
Here is Screen shot of issue
Following not working for me..
...
I also tried to change from Build Setting display name
I tried to delete and re-install app.
I tried Clean Derived data.
I tried clean project.
I tried to quit xcode.
Any Help or suggestion appreciated
Create new string file named InfoPlist.strings in string file add this string
"CFBundleDisplayName" = "YOUR APP NAME";
Hope it helps!
Go to Project Build settings Search for Product Name then set what ever you want.
I need to localize two keys of info.plist: NSLocationUsageDescription and NSCameraUsageDescription. So I tried to create a new file called InfoPlist.strings and then I localized it, but app always shows strings stored in info.plist file. What's wrong?
Official documentation from Information Property List Key Reference
Localized values are not stored in the Info.plist file itself.
Instead, you store the values for a particular localization in a
strings file with the name InfoPlist.strings. You place this file in
the same language-specific project directory that you use to store
other resources for the same localization. The contents of the
InfoPlist.strings file are the individual keys you want localized and
the appropriately translated value. The routines that look up key
values in the Info.plist file take the user’s language preferences
into account and return the localized version of the key (from the
appropriate InfoPlist.strings file) when one exists. If a localized
version of a key does not exist, the routines return the value stored
in the Info.plist file.
My InfoPlist.strings file:
NSCameraUsageDescription = "hello";
NSLocationUsageDescription = "hello hello";
Please check in the generated application package, whether the file is really stored in there and it is put to the correct location. Usually this is the missing step.
Just go into the project settings, open "Build Phases" and see whether
the file can be found in "Copy Bundle Resources"
Your plist file can have multiple versions for each language your application supports.
In Utilities \ File Inspector (on the right) click on "Localize":
And then choose the languages you want to have their own versions:
After that you will be able to enter each plist file and edit it as you want.
InfoPlist.strings doesn't consider your scheme's Application Region, but the region set in the device! On your device: Settings-> General -> Language & Region, check if iPhone Language is the one that you like.
Since iOS 10, you are required to add the privacy keys to your Info.plist.
<key>NSPhotoLibraryUsageDescription</key>
<string>Please allow access to the photo library.</string>
Of course, you still need those keys to be localized (and you can't localize the application's Info.plist). So you ALSO add those privacy keys to the InfoPlist.strings, which in turn are localized.
"NSPhotoLibraryUsageDescription" = "Please allow access to the photo library.";
As a matter of fact, my problem was that I had misspelled the NSLocationWhenInUseUsageDescription constant so of course it was not taken into account.
Sometimes you have to make a Clean first, Click Menu -> Product -> Clean.
In my case there was a conflict with other InfoPlist.strings file from another build target.
After double checking everything said in this thread, my last action was deleting the app and its' data then re-run/re-install it to Simulator and my localization worked for Info.plist
One more thing, I made the simulator main language the testing language I want (Arabic), and to change that in the simulator Settings>General>Language
The file needs to be inside of a directory indicating the language, for example en.lproj
It depends on your iPhone or iPad ‘s language, it will automatically pick the description from the "InfoPlist.strings" file.
My app name I want to show up on users iPhone is not in english. My project name in xcode is "MyApp". In itunes connect under app name I've entered the right name I want to show up after a user installs my app. What is the appname the user will see?
the name that will be shown can be set in the info.plist with the tag
Bundle display name
Build Settings for project to set target file:
and in "Info" add the part
Bundle display name String "MyCustomName"
You may also add a localized file named InfoPlist.strings and insert
CFBundleDisplayName = "MyCustomName";
for every locale ;)
In the App Store, they will see the name you have entered in iTUnes Connect, in the iDevices, they will see the name that you put in Info.plist file under 'Bundle display name'. If you didn't put anything under 'Bundle display name', then they will see the project name on their devices.
The name that will shop up under your icon on the user's device is determined by the Info.plist.
By default, this is the same as your Product name in the project build settings:
but you can change this to whatever you'd like:
*Note that a long name like my example, will be truncated.. you won't see all of that text.
I think there is also a way to localise the name that is shown. I don't know how to do this, but if someone does, please feel free to edit this answer.
And for completeness, this is taken from geo's answer:
You may also add a localized file named InfoPlist.strings and insert
CFBundleDisplayName = "MyCustomName";
for every locale
I tried to make the localization of the app name using CFBundleDisplayName.
I made the localized InfoPlist.strings according two different language.
In one strings file wrote:
CFBundleDisplayName="x11111"
and in another:
CFBundleDisplayName="y22222"
And in file info.plist, I added "Application requires iPhone environment" property, and set the boolean value to YES.
And in info.plist,the "Bundle display name" I used "x11111".
The localization worked ok on the simulator, but when tested on the device , it did not work.
On device, the name I used for 'Bundle display name' in info.plist can only be showed.
By the way, I use cocos2d for the project.
Anything I missed or did wrong?
If your localisation files were supplied to you, and you need to add them, be sure to add them correctly on per file basis. In Xcode, while you are adding files, pay attention how you add them. This is how they should look in Xcode Project Navigator.
I have added them by selecting all folders which didn't add them correctly to project.
This is probably a really silly question. but I'm struggling with it :(
I am trying to add a Root.inApp.plist file to my project so that i can have inapp specific settings for my iPhone app.
I have integrated InAppSettingsKit fine, its currently only working with the one Root.plist file tho.
I would like to add a Root.inApp.plist file to my project so that i can have inapp specific settings.
When i try to add another property file in Xcode it doesn't seem to sit under the Settings.bundle, how do i get it to show up in my Settings.bundle structure like this?:
I have tried to import the inappsettingskit bundle file also without luck :( my project doesn't recognise the Settings.bundle for some reason
Please help
No way to do that in Xcode, I believe. Just reveal the Settings bundle in Finder and add the new file to it. It'll automatically show up in Xcode.
Duplicate your existing plist file, then right click any property and select iPhone Settings plist under Property List Type.