Dev:Hooking Instance Variables

This page is dedicated to the use of the MSHookIvar function, included in Cydia Substrate, to modify instance variables. This function is meant to be used when one can't get an instance variable through instance methods.

Header definition
Used like this:

Where:


 * 1) type is a primitive type (int, char, struct CGRect, a pointer or a reference to), a C++ class or an Objective-C class (NSObject *, UILabel *).
 * 2) object is the variable that contains the target instance variable.
 * 3) ivar_name is a C string, not an Objective-C string (so no @ sign).