Skip to content

Instantly share code, notes, and snippets.

@PoomSmart
Created December 22, 2021 13:24
Show Gist options
  • Select an option

  • Save PoomSmart/cb80c49afc003e72018bb5635593f584 to your computer and use it in GitHub Desktop.

Select an option

Save PoomSmart/cb80c49afc003e72018bb5635593f584 to your computer and use it in GitHub Desktop.

Revisions

  1. PoomSmart created this gist Dec 22, 2021.
    14 changes: 14 additions & 0 deletions PVC.x
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    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;
    }