1. Unreferenced image detection LSUnusedResources
Install the plug-in LSUnusedResources and run it with the [My Mac] simulator, as shown below:
Project Path
It is the path where the project is located, and then click Search
the button in the lower right corner to see the searched image resources.
Note: Do not delete the results searched here directly. It is best to find the corresponding image resources in the project, double-check whether they are really not referenced, and then delete the images in the project.
2. No reference file detection XcodeProjectArrangementTool
Download the XcodeProjectArrangementTool plug-in and run it with the [My Mac] simulator, as shown below:
Project Path
is the path in the project xx.xcodeproj
, and then click Search
. The left box of the search results shows the used files, and the right box shows the unused files.
Note: It is best not to delete the unreferenced files searched here directly. You need to go to the project to confirm again. If it is a project developed by multiple people, you need to confirm with colleagues whether the file is really unnecessary. After final confirmation Delete the file again.
It is detected that it is useless, but it is actually useful :
1. Unit test files; 2. Business logic is
only implemented through methods (because no file import is required); 3. Interface language implementation, external calls do not need to import the file of.+(void)load
c++
Tips : When we delete the retrieved useless files, some unreferenced pictures may be released, so if we LSUnusedResources
search again, there may be some more unreferenced pictures.