Latest 1.0.2
Homepage https://github.com/iiiCeBlink/ICMethodDigger
License MIT
Platforms ios 8.0, requires ARC
Authors

ICMethodDigger 中文说明

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:

#import "ICMethodDigger.h"

2. call icm_logMethod method to log what you want:

FOUNDATION_EXTERN void icm_logMethod(Class cls, ICConditionBlock condition, _Nullable ICBeforeBlock before, _Nullable ICAfterBlock after);
  • log all methods of target class
icm_logMethod([ViewController class], ^BOOL(SEL sel) {
        NSLog(@"%@", NSStringFromSelector(sel));
        return NO;
    }, nil, nil);
  • log methods of target class at running
icm_logMethod([ViewController class], ^BOOL(SEL sel) {
        NSLog(@"%@", NSStringFromSelector(sel));
        return YES;
    }, nil, nil);
  • log cost time of method
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

LICENSE

ICMethodDigger is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "ICMethodDigger",
    "version": "1.0.2",
    "summary": "An easy way to print almost methods including private methods (supported arm64 architecture devices).",
    "homepage": "https://github.com/iiiCeBlink/ICMethodDigger",
    "license": "MIT",
    "authors": {
        "iiiCeBlink": "[email protected]"
    },
    "source": {
        "git": "https://github.com/iiiCeBlink/ICMethodDigger.git",
        "tag": "1.0.2"
    },
    "source_files": [
        "ICMethodDigger/Source/*.{h,m,s}",
        "ICMethodDigger/Source/PublicHeader/*.h"
    ],
    "module_name": "ICMethodDigger",
    "private_header_files": "ICMethodDigger/Source/*.h",
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "xcconfig": {
        "VALID_ARCHS": ""arm64""
    }
}

Pin It on Pinterest

Share This