工具介紹:
給項(xiàng)目中植入插件
新建項(xiàng)目nic.pl
選中tweak,當(dāng)前我這邊是17
- 輸入nic.pl后,選擇模板輸入10
Choose a Template (required): 17
2.輸入tweak的工程名
Project Name (required): xxTweak
3.輸入deb包名(格式類似bundle Identifier)
Package Name [com.yourcompany.readertweak]: com.xx.com - 輸入作者或維護(hù)人名字
Author/Maintainer Name [mac]: XX - 輸入tweak作用的對象,就是需要需要HOOK的APP的bundle Identifier
[iphone/tweak] MobileSubstrate Bundle filter [com.apple.springboard]: {{bundle Identifier}}
代碼修改:
在Makefile中,設(shè)置設(shè)備的ip端口(我這邊用wifi,ip同ssh中的ip,端口默認(rèn)22)
export THEOS_DEVICE_IP=192.xxx.101.xxx
export THEOS_DEVICE_PORT=22
編譯安裝
make clean && make && make package && make install
插件編寫:
這是Makefile里面的內(nèi)容如下,注意不同的目錄或者文件要用空格隔開:
項(xiàng)目名_FILES = src/Tweak.x src/Student/*.m
1
在 .x文件中要使用Student類,需要包含.h文件