macOS下的QQ还是增加了消息撤回功能,稍微研究了一下,只需要Hook一个函数即可。
可以考虑写一个dylib然后附上去,代码如下。然后至于说是用DYLD_INSERT_LIBRARIES这个环境变量,还是说直接改load_commands就看个人喜好了,这里不展开写。
#import <Foundation/Foundation.h> #import <objc/runtime.h> void handleRecallNotifyIsOnline(id, SEL, void *, BOOL) {} #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wundeclared-selector" static void __attribute__((constructor)) initialize(void) { method_setImplementation(class_getInstanceMethod(NSClassFromString(@"QQMessageRevokeEngine"), @selector(handleRecallNotify:isOnline:)), (IMP)&handleRecallNotifyIsOnline); } #pragma clang diagnostic pop
たーのし!
可以放心更新了
(好像我已经不用mac了QwQ)
大佬,6
(q๑•̀ω•́)و✧