Makefile
export THEOS = /opt/theos
export THEOS_DEVICE_IP = 192.168.1.106
export ARCHS = armv7 arm64
export TARGET = iPhone:latest:8.0
include $(THEOS)/makefiles/common.mk
TWEAK_NAME = xin
xin_FILES = Tweak.xm
xin_FRAMEWORKS = UIKit
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec “killall -9 SpringBoard”
Tweak
%hook CMessageMgr
- (void)AsyncOnAddMsg:(id)arg1 MsgWrap:(id)arg2 {
UIAlertController *alerView = [UIAlertController alertControllerWithTitle:@“通知” message:@“HOOK” preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@“确定” style:UIAlertActionStyleCancel handler:nil];
[alerView addAction:cancelAction];
[self presentViewController:alerView animated:YES completion:nil];
}
%end
然后插件装在手机上,微信收到新消息就闪退了,我想知道我这思路对吗?请不吝赐教~~~谢谢