The FengNiao project is a lightweight command-line utility designed to help iOS/macOS developers clean up their Xcode projects by detecting and removing unused image resource files. As projects evolve, image assets often accumulate — many of which may no longer be referenced in code, storyboards, or asset catalogs; FengNiao scans the project directory (and subfolders) to identify those orphaned resources and optionally delete them, helping to reduce project bloat and potential app size. The tool is written in Swift, distributed under MIT license, and supports installation via Swift Package Manager or compilation from source. It supports common image resource types (e.g., PNG, JPG, PDF, imagesets) and scans typical source and layout files (Swift, Objective-C, XIBs, storyboards, plist) to find references.
Features
- Command-line tool to scan for unused image/resource files in Xcode projects
- Supports common resource extensions (imageset, png, jpg, pdf, gif, etc.) and code/layout file types for reference scanning
- Option to interactively list or delete unused resources, with safety prompts by default
- Can be installed via Swift Package Manager or compiled from source and added to PATH
- Can be hooked into Xcode build phases to run automatically during builds or archives
- Lightweight, open-source (MIT), and usable across many Swift/Objective-C iOS or macOS projects