I localized Info.plist :
And I got this build error :
error: could not read data from '/Users/cherif/Apps/Wesh/Info.plist': The file “Info.plist” couldn’t be opened because there is no such file.
Actually there are now two Info.plist files :
fr.lproj/Info.plist Base.lproj/Info.plist
How to localize the Info.plist path ?
You should use InfoPlist. strings file (keep both I & P capital) to localize values of Info. plist . To do this, go to File->New->File , choose Strings File under Resource tab of iOS , name it InfoPlist , and create.
Xcode supplies an information property list file when you create a project from a template, as described in Create a project. By default, Xcode names this file Info. plist and adds it to your project as a source file that you can edit. Xcode creates one information property list for each target in the project folder.
Roll back those changes, add a InfoPlist.strings file to your project, localize it and then add the needed keys to it. For example:
"CFBundleDisplayName" = "App display name"; "CFBundleName" = "App bundle name";
To localized Info.plist :
"NSLocationAlwaysAndWhenInUseUsageDescription"="blabla";
"NSLocationAlwaysUsageDescription"="blabla2";
That's all work and you have localize your info.plist file!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With