suc
is commandline tool that helps you to keep color resources of Xcode project on track.
> git clone https://github.com/ABashkirova/SwiftUsedColors.git
> cd SwiftUsedColors
> swift build -c release
> cp .build/release/suc /usr/local/bin/suc
pod 'SwiftUsedColors'
suc
will be installed at ${PODS_ROOT}/SwiftUsedColors/suc
Just type suc
under your project's path
> suc
or use with options
> suc -p <PATH OF XCODEPROJECT> -t <TARGET> -r <DIRECTORY FOR REPORT>
or
Add a "Run Script" phase to each target.
"${PODS_ROOT}/SwiftUsedColors/suc"
On every project build suc
will throw warnings about unused colors and used colors on xibs but missed in xcassets
.
suc
finds colors included in the target, and then detects if they are used by the xibs, storyboards, and swift files.
suc
collects project's colors in the colors.html
in the directory for report specified in option --report
.