xuezhulian / classunref Goto Github PK
View Code? Open in Web Editor NEWiOS代码瘦身:未使用的类
iOS代码瘦身:未使用的类
Error:class symbols null
请问下返回这个结果是什么问题?能否指点一下
是否可以支持查找Framework或者.a文件
测试了下,没看到结果。已知我的包里肯定有没调用的函数。
jinglian@leqiang222deiMac classunref % python classunrefs.py
Please input app path
For example:/Users/yuencong/Library/Developer/Xcode/DerivedData/***/Build/Products/Dev-iphoneos/***.app
/Users/jinglian/Desktop/doc.app
Traceback (most recent call last):
File "classunrefs.py", line 131, in <module>
path = input('Please input app path\nFor example:/Users/yuencong/Library/Developer/Xcode/DerivedData/***/Build/Products/Dev-iphoneos/***.app\n').strip()
File "<string>", line 1
/Users/jinglian/Desktop/doc.app
^
SyntaxError: invalid syntax
项目是Swift和OC混编工程,执行脚本失败,输出如下:
Get class list pointers...
Error:class list pointers null
看了一些文章,有Swift后 __objc_classlist 由原来的DATA段,变成了DATA_CONST段(https://ming1016.github.io/2020/03/29/apple-system-executable-file-macho/#/Data)。了解这个后改了一点,不足以全部执行成功,执行继续报错。菜鸟解决不了了,期待大神更新!🙏🏻
if not os.path.isfile(path):
print("22")
return None
if not os.popen('file -b ' + path).read().startswith('Mach-O'):
print("33")
return None
这两个报错啊 Error:invalid app path
app路径:/Users/bjhl/Desktop/GitHub/selectorsunref/classunref/xx.app
python3 classunrefs.py demo.app
或者使用绝对路径,
输出:
Please input app path
For example:/Users/yuencong/Library/Developer/Xcode/DerivedData//Build/Products/Dev-iphoneos/.app
然后就没有任何反应了,一个多小时之后也没有任何反应
/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'classunref.py': [Errno 2] No such file or directory
python3 环境 raw_input 和 print 问题 没办法提交分支 所有麻烦作者看下了
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.