APP It is often necessary to clean up images that are not used in the project before they are released, which may be test images or images that were left over from previous versions.
Use the method to save the following code to **.sh and then CHOMD 777 to make it executable
Copy the **.sh to the project root directory
./Executive **.sh
A imge.txt result file is generated under the sibling directory
Such as
Source
#!/bin/shEcho "To remove a risk, you need to be cautious if you want to reconfirm that the picture is referenced."Echo "Defult.png and for example [UIImage imagenamed:@ ' img.png '] may be wrongly reported"Read-n1-p" Y" check How to confirm "N" directly for image retrieval "Case$answer inch "Y"|"Y") Open-a Safari"http://blog.csdn.net/hufeng825/article/details/8533647"Echo-N"Press any key to start the program"; read Var;;"N"|"n")Echo "When the command executes, the terminal will enter results after the search is complete and the results report will be automatically generated under the current path Imag.txt";; *) ;; Esacproj= ' Find. ! -name' *.xib '-o-name' *. [MH] '-o-name' *.storyboard '-o-name' *.mm '-o-name' *.html '`Echo "~~~~~~~~~~~~ Start searching for ~~~~~~~~~~~~">>'./image.txt '; forPnginch' Find. -name' *.png '` DoName= ' basename-s. png$png' Name= ' basename-s @2x$name`if! Grep-qhs"$name" "$PROJ"; Then Echo "$png may not be quoted." Echo "$png may not be quoted.">>'./image.txt ';fi Done forJpginch' Find. -name' *.jpg '` DoName= ' basename-s. jpg$jpg' Name= ' basename-s @2x$name`if! Grep-qhs"$name" "$PROJ"; Then Echo "$png may not be quoted." Echo "$jpg may not be quoted.">>'./image.txt ';fi DoneEcho "~~~~~~~~~~~~ End search ~~~~~~~~~~~~">>'./image.txt '; <<eof
Images not used in the iOS Madness cleanup project