通過(guò)theos實(shí)現(xiàn)非常簡(jiǎn)單的hoke操作,下載地址:https://github.com/theos/theos
1,安裝HomeBrew。
2,在終端敲 brew install ldid
3,修改環(huán)境變量(保存下載地址為一個(gè)變量THEOS)
vim ~/.bash_profile
export ?THEOS=~/theos
export PATH=$THEOS/bin:$PATH
4,在終端的根目錄下敲echo $THEOS 如果結(jié)果為空。說(shuō)明導(dǎo)入export ?THEOS=~/theos沒(méi)有起作用
5,敲source .bash_profile 運(yùn)行一下.bash_profile(使環(huán)境變量THEOS,PATH生效),再echo $THEOS就會(huì)打印出路徑了。
?4,下載theos ,git clone --recursive https://github.com.theos/theos.git ?$THEOS

theos的使用
1,cd 到 Desktop(桌面)

用sublime打開(kāi) Project Name 的項(xiàng)目里面要修改三種文件:
1>,Makefile 配置一下手機(jī)的IP地址和端口號(hào)
2>,在Tweak.xm中編寫(xiě)要修改的demo
3>, .plist文件中有配置項(xiàng)目的id

卸載修改的文件,打開(kāi)IFunBox ? 進(jìn)入 Device/Library/MobileSubStrate/DynamicLibraries 刪除 ? 項(xiàng)目名.dylib 和 項(xiàng)目名.plist這兩個(gè)文件。