iOS 清理Xcode项目中没有使用到的图片资源和类文件

转自:http://www.cnblogs.com/chao8888/p/6690001.html

关于无用图片资源

LSUnusedResources

LSUnusedResources 感谢改工具开发者 GitHub链接https://github.com/tinymind/LSUnusedResources

A Mac App to find unused images and resources in an XCode project. It is heavily influenced by jeffhodnett‘sUnused, but Unused is very slow, and the results are not entirely correct. So I made some performance optimization, the search speed is more faster than Unused.

Usage

It's an useful utility tool to check what resources are not being used in your Xcode projects. Very easy to use:

ClickBrowse..to select a project folder.

ClickSearchto start searching.

Wait a second, the results will be shown in the tableview.

Feature

CheckIgnore similar nameto ignore the resources which referenced by string concatenation.

For example:

You import some resources like:

icon_tag_0.png

icon_tag_1.png

icon_tag_2.png

icon_tag_3.png

And using in this way:

NSIntegerindex = random() %4;UIImage*img = [UIImageimageNamed:[NSStringstringWithFormat:@"icon_tag_%d", index]];

icon_tag_x.pngshould not be shown as unused resource, we should ignore them.

Installation

Download:LSUnusedResources.app.zip

Or build and run the project using XCode.

Requirements

Requires OS X 10.7 and above, ARC.

关于没有使用到的类文件, 使用前实现备份

!!!!!! 如果你项目中有使用到xib和storyboard 一定要注意,这个工具并不检测storyboard,坑啊!回过头来我才知道为啥有的界面app会直接挂掉,因为找不到相关类文件呀!还要一步步检测 ,慎重使用!

连接https://github.com/CatchZeng/CATClearProjectTool

CATClearProjectTool

clear objective-c project unused class file

Please backup before use it!

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容