Skip to content

Instantly share code, notes, and snippets.

@PoomSmart
Created December 22, 2021 13:24
Show Gist options
  • Save PoomSmart/cb80c49afc003e72018bb5635593f584 to your computer and use it in GitHub Desktop.
Save PoomSmart/cb80c49afc003e72018bb5635593f584 to your computer and use it in GitHub Desktop.
iOS YouTube Logging
void (*YTPlayerLogPVC)(NSString *, ...);
%hookf(void, YTPlayerLogPVC, NSString *format, ...) {
va_list args;
va_start(args, format);
NSLogv(format, args);
va_end(args);
}
%ctor {
NSString *frameworkPath = [NSString stringWithFormat:@"%@/Frameworks/Module_Framework.framework/Module_Framework", NSBundle.mainBundle.bundlePath];
MSImageRef ref = MSGetImageByName([frameworkPath UTF8String]);
YTPlayerLogPVC = MSFindSymbol(ref, "_YTPlayerLogPVC");
%init;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment