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 :

  1. Find in the x-code the folder Resources (is placed in root)
  2. Select the folder Resources
  3. Then press the main menu File->New->File...
  4. Select in section "Resource" Strings File and press Next
  5. Then in Save As field write InfoPlist ONLY ("I" capital and "P" capital)
  6. Then press Create
  7. Then select the file InfoPlist.strings that created in Resources folder and press in the right menu the button "Localize"
  8. Then you Select the Project from the Project Navigator and select the The project from project list
  9. In the info tab at the bottom you can as many as language you want (There is in section Localizations)
  10. The language you can see in Resources Folder
  11. 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
  12. 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!

Share:
12,146
Cherif
Author by

Cherif

Updated on June 11, 2022

Comments

  • Cherif
    Cherif almost 2 years

    I localized Info.plist :

    enter image description here

    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 ?