First, install Monkeydev (not jailbreak debugging):
Non-jailbreak machines or use Xcode to debug third-party applications There are many integration steps, injection dylib, integrated reveal (UI analysis tools), Class-dump (view header file tool), Cycript (debugger), etc.
First, installation: Cycript address
1. Download the relevant SDK via Cycript website
2. Put the extracted files directly under the hard disk opt folder:
3. Configure related environment variables:
Open Terminal, edit. Bash_profile pieces
$ vim ~/.bash_profile
Add the following two lines:
Export cycript_src=/opt/cycript_0.9.594/
export path= $PATH: $cycript _src
Save the exit and enter the following command:
$ source ~/.bash_profile
4. Verification:
Enter the command mode by entering the following command at the terminal:
$ cycript
Exit this command mode and enter CONTROL + D on the keyboard
5. If the Mac has Oh-my-zsh installed:
Open the terminal and edit the. zshrc file:
$ vim ~/.ZSHRC
Add "Source ~/.bash_profile":
Save Exit, enter "$ source ~/.ZSHRC" command, close terminal on open
This way, each time you open the terminal, you don't need to enter the $ source ~/.bash_profile command.
Problems encountered during the period:
When the terminal enters the "$ cycript" command, the following error is reported:
Dyld:library not loaded:/system/library/frameworks/ruby.framework/versions/2.0/usr/lib/libruby.2.0.0.dylib
Referenced from:/USERS/DEVZKN/DOWNLOADS/CYCRIPT_0.9.594/CYCRIPT.LIB/CYCRIPT-APL reason:image not found
The reason is that the Ruby version on the computer is too high
To view the current Ruby version command:
$ ruby-v
Downgrading Ruby requires you to turn off SIP mode on your Mac computer:
The computer restarts and presses the COMMAND+R, enters the recovery mode to
open the terminal, enters Csrutil disable, restarts
if wants to open the SIP, repeats the two steps, the command changes to Csrutil enable
Make a copy of Ruby 2.3 on the current computer and replace it with 2.0:
$ sudo mkdir-p/system/library/frameworks/ruby.framework/versions/2.0/usr/lib/
At this point, verify Cycript again