Create a hook for an Objective-C method
Class ObjcHook
#include <Geode/utils/ObjcHook.hpp>
classObjcHook{ ... }
No description provided
Examples0
Public static methods2
template<class Func>staticgeode::Result<std::shared_ptr<geode::Hook>>create(std::stringconst&className,std::stringconst&selectorName,Funcfunction,tulip::hook::HookMetadataconst&metadata)
className
The name of the class whose method to hook
selectorName
The name of the method to hook
function
The detour to run when the method is called
The created hook, or an error.
template<class Func>staticgeode::Result<std::shared_ptr<geode::Hook>>create(std::stringconst&className,std::stringconst&selectorName,Funcfunction,void ()*empty,tulip::hook::HookMetadataconst&metadata)
Create a hook for a new Objective-C method. This method will be created with a dummy implementation that does nothing.
className
The name of the class whose method to hook
selectorName
The name of the method to hook
function
The detour to run when the method is called
empty
A function that takes no arguments and returns nothing. This is used to create a dummy method that can be hooked.
The created hook, or an error.