就是 import 个 JSPatch.framework
我已经把 JSPatch.framework 拷贝到了 theos 工程目录了。
JSPatch.framework 的指令集
Architectures in the fat file: JSPatch.framework/JSPatch are: armv7 armv7s i386 x86_64 arm64
请问下 makefile 要怎么写?
Tweak.xm
#import <JSPatch/JSPatch.h>
%hook AppDelegate
- (BOOL)application:(id)arg1 didFinishLaunchingWithOptions:(id)arg2{
BOOL supBool = %orig(arg1,arg2);
[%c(JSPatch) startWithAppKey:@"xxxxxxxx"];
[%c(JSPatch) sync];
return supBool;
}
%end
makefile:
THEOS_DEVICE_IP = 192.168.199.240
SDKVERSION=0.1
ARCHS=armv7 arm64
TARGET = iphone:latest:8.0
include theos/makefiles/common.mk
TWEAK_NAME = MyTest
MyTest_FILES = Tweak.xm
MyTest_FRAMEWORKS = UIKit JSPatch
include $(THEOS_MAKE_PATH)/tweak.mk
after-install::
install.exec "killall -9 MyTestApp"
错误提示
fatal error: 'JSPatch/JSPatch.h'
file not found
#import <JSPatch/JSPatch.h>
^
1 error generated.