提示一下错误,不懂,希望有前辈帮忙解决下问题,SSH,和theos都装好了,但是还是
==> Preprocessing Tweak.xm…
Tweak.xm:6: error: %orig does not make sense outside a method
make[3]: *** [/Users/computer/Desktop/myseld/ios_mytest/.theos/obj/debug/armv7/Tweak.xm.97fab68c.o] Error 22
make[2]: *** [/Users/computer/Desktop/myseld/ios_mytest/.theos/obj/debug/armv7/ios_mytest.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [ios_mytest.all.tweak.variables] Error 2
hund-3:ios_mytest computer$
以下是完整码
…
hund-3:ios_mytest computer$ make package install
Making all for tweak ios_mytest…
==> Preprocessing Tweak.xm…
Tweak.xm:6: error: %orig does not make sense outside a method
make[3]: *** [/Users/computer/Desktop/myseld/ios_mytest/.theos/obj/debug/armv7/Tweak.xm.97fab68c.o] Error 22
make[2]: *** [/Users/computer/Desktop/myseld/ios_mytest/.theos/obj/debug/armv7/ios_mytest.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [ios_mytest.all.tweak.variables] Error 2
hund-3:ios_mytest computer$
…
makefile文件
‘’’
THEOS_DEVICE_IP = 192.168.2.6
ARCHS = armv7 arm64
TARGET = iPhone:latest:7.0//这里手机是8.0可否填7.0?
include $(THEOS)/makefiles/common.mk
TWEAK_NAME = ios_mytest
ios_mytest_FILES = Tweak.xm
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec “killall -9 SpringBoard”
‘’’
theos
‘’’
// Hooking SpringBoard
%hook SpringBoard
-(void)applicationDidFinishLaunching:(id)application
{
%orig;
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@“hello,Tweak” message:nil delegate:self cancelButtonTitle:@“OK” otherButtonTitles: nil];
[alert show];
[alert release];
}
%end
‘’’