iOS|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:
【iOS|iOS 清理Xcode项目中没有使用到的图片资源和类文件】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!
推荐阅读
- 知乎iOS端微交互分析
- iOS8调用系统相机和相册
- 【iOS|【iOS 开发】从 xcarchive 到分发的 ipa
- 2017年5月iOS招人心得答案总结(中级篇)
- iOS|iOS | AFNetworking介绍 & 源码分析
- iOS开发之|iOS开发之 storyboard自动布局
- C++中的cout.setf(ios::fixed)是什么意思()
- axios使用,在vue中的使用(私有和全局,封装api接口模块)
- 【iOS逆向】某交友App的x-sign算法分析
- axios|axios 拦截器管理类链式调用手写实现及原理剖析