The article belongs to Anchoriter original, reprinted please indicate source: < Jane book – Anchoriter>
This method is non-invasive and environmentally friendly for Xcode and projects!
The version used in this article is Reveal1.6.5, and other versions are not tested.
1. configuration path
Open the Reveal, first get the
path libReveal.dylib package Reveal package file open mode: find you first download and install Reveal, right-click > display the contents of the package, get the libReveal.dylib path
opens the contents of the Reveal package
gets the libReveal.dylib path
The path I get is
files can be directly dragged into the terminal, get the file address very convenient)
save the backup path, and then create a new Xcode project in 11111.xcodeproj, you can drag a few controls in Main.storyboard, easy to watch (here I put a green button). Run Xcode project, and so on, Xcode normal startup, click pause, enter the LLDB mode.
- The next key
into the first line of the input command (replacing the inside address for your own middle colon just saved address): expr (Class) NSClassFromString (@ IBARevealLoader) = nil? (void*) dlopen (“/Applications/Reveal.app/ Contents/SharedSupport/iOS-Libraries/libReveal.dylib” (0x2): (void) 0) will be displayed after waiting for a response not one of the contents of the 0000000000, and then enter the second command (void) [expr (NSNotificationCenter*) [NSNotificationCenter defaultCenter] postNotificationName:@ IBARevealRequestStart object:nil] INFO: Reveal Server; input command after the started (Protocol Version 25).
is successfully configured to suspend the program and enter the command
again click the pause button. Let Cheng Xuzheng Run often.
opens our Reveal and selects the project we just created to see the layers in our simulator.
refresh simulator on the interface after the change, we only need to refresh in the Reveal com+R will be able to see the new interface layer, do not have to enter the command again.
2. modify the command
Is it annoying to enter two long commands each time? There’s a solution here. We set the alias of the two commands in.Lldbinit.
opens the terminal, enters the touch ~/.lldbinit command, and enters the carriage, then enters the open ~/.lldbinit command and returns, paste the contents below in the open text editor, save and close.
Command anchoriter_reveal_load expr (Class) NSClassFromString (@ IBARevealLoader) = nil? (void*) dlopen (/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib, 0x2): ((void) 0)
Command, anchoriter_reveal_start, expr (void), [(NSNotificationCenter*) [NSNotificationCenter, defaultCenter], postNotificationName:@,, IBARevealRequestStart, object:nil];
Restart Xcode, then pause into LLDB mode, and enter our alias commands anchoriter_reveal_load and anchoriter_reveal_start to replace the previous long command, respectively
The shortcomings of this method is the only view simulator project, is not for the real machine project.
The configuration of the real machine, please refer to other articles
IOS reverse Reveal to view any app interface
Installation, configuration and use of Reveal tools for iOS reverse engineering