Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kealdishx/icmethoddigger
An easy way to print almost methods including private methods (supported arm64 architecture devices).
https://github.com/kealdishx/icmethoddigger
hook ios load log methodswizzling objective-c runtime swizzling tool
Last synced: about 2 months ago
JSON representation
An easy way to print almost methods including private methods (supported arm64 architecture devices).
- Host: GitHub
- URL: https://github.com/kealdishx/icmethoddigger
- Owner: kealdishx
- License: mit
- Created: 2018-07-29T07:16:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-08T07:24:50.000Z (almost 5 years ago)
- Last Synced: 2024-10-20T00:53:02.536Z (4 months ago)
- Topics: hook, ios, load, log, methodswizzling, objective-c, runtime, swizzling, tool
- Language: Objective-C
- Homepage:
- Size: 48.8 KB
- Stars: 107
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ICMethodDigger [中文说明](https://github.com/iiiCeBlink/ICMethodDigger/blob/master/README_CN.md)
An easy way to print almost methods including private methods (supported arm64 architecture devices).
## Requirements
- iOS 8.0+
- arm64 Device## Installation
#### Pod
```
pod 'ICMethodDigger'
```##### Manually
Drag all files under `Source` folder to your project, and **set build architecture to `arm64`**.
## Usage
#### 1. import `ICMethodDigger.h` to your target file like this:
```Objectivec
#import "ICMethodDigger.h"
```#### 2. call `icm_logMethod` method to log what you want:
```Objectivec
FOUNDATION_EXTERN void icm_logMethod(Class cls, ICConditionBlock condition, _Nullable ICBeforeBlock before, _Nullable ICAfterBlock after);
```- ##### log all methods of target class
```Objectivec
icm_logMethod([ViewController class], ^BOOL(SEL sel) {
NSLog(@"%@", NSStringFromSelector(sel));
return NO;
}, nil, nil);
```- ##### log methods of target class at running
```Objectivec
icm_logMethod([ViewController class], ^BOOL(SEL sel) {
NSLog(@"%@", NSStringFromSelector(sel));
return YES;
}, nil, nil);
```- ##### log cost time of method
```Objectivec
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);
});
```#### 3. Connect `arm64` device to your project, and then build and run.
## Contributing
Issues and pull requests are welcome!
## Acknowledgements
- [ANYMethodLog](https://github.com/qhd/ANYMethodLog)
- [MainThreadChecker](https://github.com/SatanWoo/MainThreadChecker)## LICENSE
ICMethodDigger is available under the MIT license. See the LICENSE file for more info.