is there any way to automicly point out or delete useless import in .m file of Objective-C?
Such as my .m file :
#import "A.h"
#import "B.h"
#import "C.h"
But B.h in my .m file will never be used,is there any way to automicly point out or delete it, just like AppCode IDE.
Check out here: Find unused Objective-C imports
Use as follows:
Find Unused Classes in a Path
fui --path=~/source/project/Name find
Delete All Unused Class Files w/ Prompt
fui --path=~/source/project/Name delete --perform --prompt
You can also use XCode Plugin for that:
Use xcfui
for integration with XCode
from here: https://github.com/jcavar/xcfui
Script to find unused imports:
https://gist.github.com/Orangenhain/7691314
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With