Strings catalog not removing unused strings

I have some formatting strings that got in my string catalog, e.g. "%@" or "(%@)".

However these strings are no longer used in my code anywhere (searching "In this project" in Xcode only matches the entries in my strings catalog), but Xcode does not remove them.

I tried editing the file in a text editor, removing them manually but they keep coming back.

Any solution for this?

Xcode Version 15.4 (15F31d)

Searching %@ in Project Search is unlikely to return results because in source code the string likely uses string interpolation. You could try searching for "(\(, for example. Source code such as "(\(someExpressionOfStringType))" would produce that localizable string key.

In Xcode 16 and later, the String Catalog Editor supports displaying detected usage locations of each string. Here are some ways you can do that:

  • View the Usages section of the Attributes Inspector.
  • Use the context menu on a string and select Jump to Source
  • Click the jump arrow that appears when hovering over a key
  • Open the Assistant Editor to view the source code for the selected string.

If the String Catalog doesn't show any usages for the string, but it is still not removed, please file a Feedback and then you could manually remove that string from the JSON file by context-clicking the file and selecting View As > Source Code.

Strings catalog not removing unused strings
 
 
Q