// the find
onevcat/FengNiao
A command line tool for cleaning unused resources in Xcode.
FengNiao is a CLI (plus a bolted-on macOS SwiftUI app) that scans an Xcode project, regex-matches resource file names against source/xib/storyboard/plist contents, and deletes whatever isn't referenced. It's for iOS/macOS teams with years of accumulated asset cruft who want a build-phase step to keep the app bundle slim.
It goes beyond plain string matching: the test fixtures show it understands generated asset symbols (both the ObjC header-based ones and the newer Swift `ImageResource` catalog symbols), so it doesn't just break the moment a project adopts type-safe asset access. It also edits the .pbxproj to strip references to deleted files rather than leaving dangling entries, with a `--skip-proj-reference` escape hatch for multi-project build setups where you don't want the project file touched. The test suite actually covers messy real-world cases — nested bundles, @2x/@3x suffixes, empty imagesets — not just a single flat folder.
Detection is pure regex-against-literal-names, so any dynamically constructed image name (string interpolation, `String(format:)`, looped asset names) won't be found in source and will get flagged and deleted as a false positive; the README's only mitigation is 'have a backup,' which is thin for a tool whose stated behavior is 'un-restorable.' The README itself is stale relative to the code — Travis CI badge for a service that dropped open-source support years ago, and a Codecov badge pointing at a different repo (Hedwig), suggesting docs aren't kept in sync with what's actually shipping. The GUI app under `App/` is undocumented beyond a single contributor credit and has no pre-built binary, so it's unclear if it's a maintained feature or a side experiment sharing the repo with the actual CLI tool people depend on.