How to find unused images in an Xcode project?

前端 未结 14 1631
旧时难觅i
旧时难觅i 2020-12-07 06:57

Has anyone a one-line to find unused images in an Xcode project? (Assuming all the files are referenced by name in code or the project files - no code generated file names.)

14条回答
  •  孤街浪徒
    2020-12-07 07:31

    You can make a shell script that grep your source code and compare the founded images with your project folder.

    Here the man(s) for GREP and LS

    Easily you can loop all of your source file, save images in array or something equals and use

    cat file.m | grep [-V] myImage.png

    With this trick, you can search all images in your project source code!!

    hope this helps!

提交回复
热议问题