An easy way to print almost methods including private methods (supported arm64 architecture devices).
An easy way to print almost methods including private methods (supported arm64 architecture devices).
pod 'ICMethodDigger'
Drag all files under Source
folder to your project, and set build architecture to arm64
.
ICMethodDigger.h
to your target file like this:#import "ICMethodDigger.h"
icm_logMethod
method to log what you want:FOUNDATION_EXTERN void icm_logMethod(Class cls, ICConditionBlock condition, _Nullable ICBeforeBlock before, _Nullable ICAfterBlock after);
icm_logMethod([ViewController class], ^BOOL(SEL sel) {
NSLog(@"%@", NSStringFromSelector(sel));
return NO;
}, nil, nil);
icm_logMethod([ViewController class], ^BOOL(SEL sel) {
NSLog(@"%@", NSStringFromSelector(sel));
return YES;
}, nil, nil);
icm_logMethod([UIViewController class], ^BOOL(SEL sel) {
return YES;
}, nil, ^(id target, SEL sel, NSArray *args, NSTimeInterval interval, id retValue) {
NSLog(@"target:%@ sel:%@ interval: %f", target, NSStringFromSelector(sel), interval);
});
arm64
device to your project, and then build and run.Issues and pull requests are welcome!
ICMethodDigger is available under the MIT license. See the LICENSE file for more info.