就是 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.
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.