可对 Xcode 项目工程所有的 objective-c 文件内包含的明文进行加密混淆,提高逆向分析难度。
This project aims to encypt or obscure plain text for all the Objective C implement files(extension name ‘m’) in iOS project. So no plain text in your app’s binary file.
Open your project which needs to be obscured. In the Build Phases session of target, add a new Run Script, make sure this is before Compile Souces. The content of script is like below:
# 默认是 Debug 情况下运行,可根据需要自定义,比如 Release
if [ "${CONFIGURATION}" = "Debug" ]; then
# 注意由于你的工程目录可能包含 Pods 这类第三方代码,所以你需要切换到你自己代码所在的目录比如 MixIosDemo 目录
cd MixIosDemo
chmod +x ../mix.swift
../mix.swift
fi
add MixIosDemo/MixOC/MixDecrypt.h in your project
import MixDecrypt.h in your project’s pch header
You can watch MixIosDemo for detail setting
The default encrypt method is xor(maybe it just obscrue the plain text). Two steps to custom encrypt or obscure.
Attention, don’t use complex encyrpt/decyrpt method, and make sure encyrpt/decyprt right, or the running will fail.
Author: @粉碎音箱的音乐(weibo)
Blog: Blog
Please star if you think it is helpful to you. Thank you. 😄