Skip to content

Instantly share code, notes, and snippets.

@Li-blog
Created October 28, 2016 10:35
Show Gist options
  • Save Li-blog/cec15c1e6566b2170014f4a6688801be to your computer and use it in GitHub Desktop.
Save Li-blog/cec15c1e6566b2170014f4a6688801be to your computer and use it in GitHub Desktop.
Class gCtl = NSClassFromString(@"GameController");
Method getMD5ByGameContent = class_getClassMethod(gCtl, @selector(getMD5ByGameContent:));
Method getMD5ByGameContent_hooked = class_getClassMethod(self, @selector(getMD5ByGameContent_hooked:));
...
Class metaClass = objc_getMetaClass(class_getName(gCtl));
class_replaceMethod(metaClass, ...
class_replaceMethod(metaClass, ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment