教会大家如何搭建逆向开发环境。
- 准备工作
1、Xcode软件开发工具
2、Mac电脑或者黑苹果
3、Apple ID一个
- 下载Xcode
进入Mac系统商店,下载Xcode软件开发工具,如图1。
图1
- 安装brew
1、打开终端,执行以下命令:xcode-select--install,如图2。
图2
2、然后配置环境变量,打开终端,执行以下命令:
export HOMEBREW_INSTALL_FROM_API=1
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git",如图3。
图3
- 下载脚本并安装Homebrew / Linuxbrew,然后终端命令行输入以下命令:
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
/bin/bash brew-install/install.sh
rm -rf brew-install,如图4。
图4
4、安装成功后将brew程序的相关路径加入到环境变量中,下面是基于Apple Silicon CPU 设备上的 macOS 系统(命令行运行 uname -m 应输出 arm64)上的 Homebrew:
test -r ~/.bash_profile && echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
test -r ~/.zprofile && echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile,如果是基于 Intel CPU 设备上的 macOS 系统(命令行运行 uname -m 应输出 x86_64)的用户可以跳过这一步,如图5。
图5
5、终端执行下面的命令:
HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
for tap in core cask{,-fonts,-versions} command-not-found services; do
brew tap --custom-remote --force-auto-update "homebrew/${tap}" "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-${tap}.git"
done
brew update
在命令行输入以下命令:
sudo /bin/sh -c "$(curl -fsSL https://gitee.com/allenzhang/note/raw/master/md-install)"
- 搭建完成
打开Xcode,选择新建项目,选择IOS项目,拉到底,可以看到图片上的MonkeyAPP就代表已经搭建成功了!如图6。
图6
以上就是介绍搭建IOS逆向开发环境的详细教程。