No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
The source code and README can be found at the [https://github.com/DavidGoldman/InspectiveC Github page]. | The source code and README can be found at the [https://github.com/DavidGoldman/InspectiveC Github page]. | ||
== Usage == | |||
You can view the official documentation at the Github page linked above. In the example below, I'll be using the InspCWrapper. | |||
<source lang="objc"> | |||
#include "InspCWrapper.m" | |||
%hook SBApplicationController | |||
- (id)init { | |||
id result = %orig; | |||
// Watch this object. | |||
watchObject(result); | |||
return result; | |||
} | |||
%end | |||
%ctor { | |||
%init; | |||
// Watch all direct instances of SBDockView. | |||
watchClass(%c(SBDockView)); | |||
// Watch all methods named "icon:launchFromLocation:". | |||
watchSelector(@selector(icon:launchFromLocation:)); | |||
} | |||
</source> |
Revision as of 01:16, 31 January 2015
InspectiveC is an Objective-C library that you can use on your 32-bit devices in order to log useful information about certain objects, classes, and selectors.
The source code and README can be found at the Github page.
Usage
You can view the official documentation at the Github page linked above. In the example below, I'll be using the InspCWrapper.
#include "InspCWrapper.m"
%hook SBApplicationController
- (id)init {
id result = %orig;
// Watch this object.
watchObject(result);
return result;
}
%end
%ctor {
%init;
// Watch all direct instances of SBDockView.
watchClass(%c(SBDockView));
// Watch all methods named "icon:launchFromLocation:".
watchSelector(@selector(icon:launchFromLocation:));
}