Build error after I localized Info.plist
12,146
Solution 1
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";
Solution 2
To localized Info.plist :
- Find in the x-code the folder Resources (is placed in root)
- Select the folder Resources
- Then press the main menu File->New->File...
- Select in section "Resource" Strings File and press Next
- Then in Save As field write InfoPlist ONLY ("I" capital and "P" capital)
- Then press Create
- Then select the file InfoPlist.strings that created in Resources folder and press in the right menu the button "Localize"
- Then you Select the Project from the Project Navigator and select the The project from project list
- In the info tab at the bottom you can as many as language you want (There is in section Localizations)
- The language you can see in Resources Folder
- To localize the values ("key") from info.plist file you can open with a text editor and get all the keys you want to localize
- You write any key as the example in any InfoPlist.strings like the above example
"NSLocationAlwaysAndWhenInUseUsageDescription"="blabla";
"NSLocationAlwaysUsageDescription"="blabla2";
That's all work and you have localize your info.plist file!
Author by
Cherif
Updated on June 11, 2022Comments
-
Cherif almost 2 years
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 ?