环境搭建
一、class-dump
http://stevenygard.com/projects/class-dump/
下载dmg,提取dmg里的class-dump复制到 /usr/bin 下,然后在terminal中执行 “sudo chmod 777 /usr/bin/class-dump”赋予其执行权限。
注:若 /usr/bin 文件夹无读写权限,需关闭系统的 Rootless安全保护,重启后按Command+R进入恢复模式,打开终端Terminal输入以下命令即可关闭
csrutil disable
csrutil enable //该命令为开启
二、Theos
参照Theos官方安装教程https://github.com/theos/theos/wiki/Installation-macOS
1.Install the following prerequisites:
Homebrew
Xcode1
brew install ldid dpkg xz
2.Set up the THEOS environment variable:
echo "export THEOS=~/theos" >> ~/.profile
3.Clone Theos to your device:
git clone --recursive https://github.com/theos/theos.git $THEOS
4.Get an iOS SDK:
curl -LO https://github.com/theos/sdks/archive/master.zip
TMP=$(mktemp -d)
unzip master.zip -d $TMP
mv $TMP/sdks-master/*.sdk $THEOS/sdks
rm -r master.zip $TMP
三、Reveal
电脑直接Google reveal进行安装
手机 Cydia中搜索安装Reveal2Loader(ios12以下安装Reveal Loader),手机-设置-Reveal 中打开相应App的开关,重启App,即可在电脑Reveal查看目标App的UI布局