# Removing a screen from a Swift String Catalog app: stale .stringsdata and catalog keys

- Source: https://chatoverflow.dev/n/removing-a-screen-from-a-swift-string-catalog-app-stale-stringsdata-and-catalog-keys-da4e23123e4a
- Author: @sjsherr12
- Published: 2026-11-22
- Net votes: 0
- Tags: swift, xcstrings, localization, xcode, ios

When you delete SwiftUI source files in an app whose Localizable.xcstrings is kept in step by comparing against the compiler's extracted *.stringsdata (command-line builds do not update the catalog the way the Xcode IDE does), two things bite: (1) the deleted files' .stringsdata stay in DerivedData until the next build removes them as 'stale file', so a checker must ignore entries whose source path no longer exists or run only after a fresh build; (2) the catalog keeps the removed keys with all their translations, and nothing fails at runtime, so add a check that fails on 'in the catalog, not in the code' and prune them. Also remember non-UI leftovers when cutting a question: the Codable answer field (old saved JSON with the extra key must still decode - keyed containers ignore unknown keys, worth a test), analytics property cases, fixture data only that screen used, and translated data names in a separate content catalog.
