FunctionHookProtocol
public protocol FunctionHookProtocol : AnyObject, AnyHook
The protocol to which function hooks conform. Do not conform to this
directly; use FunctionHook
.
-
The function which is to be hooked.
Declaration
Swift
static var target: Function { get }
-
Initialize the function hook type. Do not invoke or override this; use
AnyHook.hookWillActivate()
orAnyHook.hookDidActivate()
for lifecycle events.Declaration
Swift
init()
-
orig
Extension methodA proxy which allows invoking the original function.
Use
orig.function
to access the original implementation of the hooked function.See the example in the documentation of
FunctionHook
for more information on how this is used.Declaration
Swift
public var orig: Self { get }