tweak 使用

工具介绍:
给项目中植入插件

新建项目nic.pl
选中tweak,当前我这边是17

  1. 输入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
  2. 输入作者或维护人名字
    Author/Maintainer Name [mac]: XX
  3. 输入tweak作用的对象,就是需要需要HOOK的APP的bundle Identifier

[iphone/tweak] MobileSubstrate Bundle filter [com.apple.springboard]: {{bundle Identifier}}

代码修改:
在Makefile中,设置设备的ip端口(我这边用wifi,ip同ssh中的ip,端口默认22)

export THEOS_DEVICE_IP=192.xxx.101.xxx
export THEOS_DEVICE_PORT=22

编译安装
make clean && make && make package && make install

插件编写:
这是Makefile里面的内容如下,注意不同的目录或者文件要用空格隔开:

项目名_FILES = src/Tweak.x src/Student/*.m
1
在 .x文件中要使用Student类,需要包含.h文件

import "Student/Student.h"

你可能感兴趣的:(tweak 使用)