Jeffrey
Jeffrey

Reputation: 658

Xcode string catalog stopped removing unused entries

While using the Xcode string catalog for years in various projects, one project in particular stopped removing unused strings altogether. When adding a new string via, for example, Text("Hello World"), it’s automatically added to the catalog and marked as “new.” But when I remove the Text component from the view and build again, it remains in the catalog without being marked as stale.

When clicking on an entry in the catalog, Xcode shows the usage of the entry, but even though it’s not marked as stale, the usage column is empty, indicating the string has indeed been removed from the project.

This is making my project quite messy. I hoped the latest Sequoia update would resolve this issue, but unfortunately, it did not. The rest of the string catalog’s functionality is working properly.

I’ve tried cleaning the project, removing the catalog and creating a new one, and enabling “Use compiler to extract Swift strings,” but nothing seems to work. It’s worth mentioning that other projects work just fine.

Upvotes: 0

Views: 158

Answers (1)

Jeffrey
Jeffrey

Reputation: 658

This issue was caused by adding an embedded framework as the catalogs target membership. Removing it immediately resolved the problem.

Upvotes: 0

Related Questions