xcstrings file in not being updated

I'm using Xcode 15.2 and have migrated my (macOS) project to use an xcstrings file a while back. Now when I check the xcstrings file, all items are marked as "stale". When I add new localized strings in code, they don't show up in the xcstrings file. The xcstrings file is built correctly (into <locale>.lproj/Localizable.strings) when building.

Where can I check which source files are checked to update xcstrings status? "xcstringstool" appears to have a "sync" feature which reads "stringsdata" files, but there is no information in the xcstringstool help on where the stringsdata files come from.

If I create a new project I can see a "stringsdata" file being generated for each source file in the intermediate build products folder.

Replies

Additional information: I am able to completely break this in the same way in a new project by going into the intermediates folder and deleting the "stringsdata" files. They will reappear after a clean build, but the xcstrings file will show all strings as "Stale" in Xcode, and localized strings added in the code will not appear in the xcstrings file.

  • What I do notice with very large code bases is after the build is launched to the device, Xcode is still extracting strings after launch.

Add a Comment

SOLVED: The target setting "Use compiler to extract Swift strings" had somehow been set to No.

  • Thanks for letting us know.

Add a Comment