Settings.bundle Localization Broken

206 views Asked by At

A few weeks ago, I added a Settings bundle to my app and localized its entries following the awesome tutorial by Use Your Loaf. Back then, it was working without problem.

Now I came back to my project after a few weeks, same Xcode version (9.3), and found these issues:

  • I can't see the strings files in the Project Navigator: The language folders are missing the expected disclosure controls:

enter image description here

  • If I delete the Settings bundle and start over, I get:

    • Settings.bundle
    • en.lproj
    • Root.plist

...but the English language folder is still missing the disclosure indicator.

  • When I install my app in the device or Simulator and go to the Settings page, the localization keys are displayed (as if the string files for all languages were missing).

  • However, if I go to the Products folder (from the Xcode Project Navigator, "Show in Finder...") and inspect the contents of my app bundle, and the settings bundle within it, the language directories are there with their respective strings files inside.

What am I missing?


Update

I tried creating a new, bare project and adding a settings bundle to that, but I get the same result. I went back to Xcode 9.2 (which I also have installed), and the issue does not occur. Either there's a bug on 9.3 (unlikely, since it was working when I first added the bundle) or my installation is broken.

I just checked and noticed there's an update available for Xcode 9.3 (9.3.1), so I'll download that and try again...

1

There are 1 answers

0
Nicolas Miari On BEST ANSWER

As I suspected, my installation of Xcode was broken.

After reinstalling Xcode by updating to 9.3.1, adding a settings bundle results in the expecyed behaviour:

enter image description here

Not the most common scenario, I know, but I hope this answer helps someone in the same situation someday.