Tweak 安装hook插件成功,但是hook无效

control:
Package: com.nadou.theosdemo
Name: theosDemo
Version: 0.0.1
Architecture: iphoneos-arm
Description: An awesome MobileSubstrate tweak!
Maintainer: aaron
Author: aaron
Section: Tweaks
Depends: mobilesubstrate (>= 0.9.5000)

makefile:

TARGET := iphone:clang:latest:7.0
INSTALL_TARGET_PROCESSES = SpringBoard

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = theosDemo
theosDemo_FRAMEWORKS = UIKit
theosDemo_FILES = Tweak.x
theosDemo_CFLAGS = -fobjc-arc
include $(THEOS_MAKE_PATH)/tweak.mk

theosDemo.plist:

{ Filter = { Bundles = ( “com.apple.springboard” ); }; }

Tweak.x:

#import <UIKit/UIKit.h>

%hook SpringBoard
– (void)_menuButtonDown:(id)down
{
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@“Hello,lecoding!”
message:nil
delegate:self cancelButtonTitle:@“OK”
otherButtonTitles:nil];
[alert show];
%orig; // call the original _menuButtonDown:
}
%end

解决了 是因为Cydia Substrate 版本过高导致的 目前我的手机是iphone 5s ios9.1,而Cydia Substrate之前是0.9.63,降级成0.9.62就可以了。

思路参考这个贴: Theos tweak dylib 没有注入