InspectiveC: Difference between revisions

From iPhone Development Wiki
(Added directions on finding log data)
(Added instruction to check the system log.)
 
Line 38: Line 38:


Sandboxed data containers are in /var/mobile/Containers/Data/Application/.
Sandboxed data containers are in /var/mobile/Containers/Data/Application/.
To find the folder where InspectiveC put the logs, check the system log.

Latest revision as of 02:56, 11 April 2016

InspectiveC is an Objective-C library that you can use 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:));
}

Accessing the logs

For processes that are not sandboxed, the log that InspectiveC generates is placed in /var/mobile/Documents/InspectiveC/.

As of iOS 9, many built-in apps, such as Safari, have their data stored in sandboxed containers, not just AppStore apps anymore.

Sandboxed data containers are in /var/mobile/Containers/Data/Application/.

To find the folder where InspectiveC put the logs, check the system log.