Reveal: A powerful tool for analyzing iOS UI

Source: Internet
Author: User

Go: http://security.ios-wiki.com/issue-3-4/Reveal Introduction

Reveal is a powerful tool for analyzing the iOS app UI:

Reveal can debug and modify iOS applications at run time. It connects to the application and allows the developer to edit various user interface parameters, which in turn immediately reflect on the program's UI. Just like debugging an HTML page with Firebug, you can debug and modify the iOS user interface without rewriting the code, rebuilding and redeploying the application. --infoq

Reveal running on Mac, the latest version of the current is 1.0.4, which can be downloaded from here, requires Mac OS X 10.8 and above, IOS 6 and above.

Now the official version can be downloaded for 30 days, after the trial period to purchase. If necessary, you can buy one, the function is quite powerful.

Reveal features View the view hierarchy for iOS apps

Effects of using reveal

In the left-hand side of the graph, you can see the view's name, which is the 3D display of the view, so you can see the hierarchy of the view very clearly.

You can see the effect without compiling the parameters after modifying them

Another very useful feature of reveal is the dynamic modification of parameters without the need to edit dynamic viewing effects. As shown in the following:

The key attribute values for Uilabel and UIView are shown, and more importantly, these can be dynamically modified, such as when we change to tests such as:

Change the width of the image from 80 to 50, and then the effect

The arrows point to each other and can be modified dynamically.

For more features on reveal, you are welcome to explore and share. Here's how reveal integrates into iOS apps to debug.

3 Load method loading methods for reveal (1)

After downloading the reveal, you can find a way to integrate to the Xcode project in Help in the menu, which is not described here.

Load Method (2)

Integrating Reveal without modifying your Xcode project
Reveal: Review the view structure of the IOS app.
Gives you a way to load the use of reveal without modifying the Xcode project.

Creates a new file in the current user directory. Lldbinit, the file is loaded at ~/.lldbinit,lldb each time it is started.

Enter the following in the. Lldbinit:

Command alias Reveal_load_sim expr (void*) Dlopen ("/applications/reveal.app/contents/sharedsupport/ios-libraries/libreveal.dylib",0x2); command alias Reveal_load_dev expr (void*) Dlopen ([(nsstring*) [(nsbundle*) [nsbundle Mainbundle] pathforresource:@"libreveal" oftype:@"Dylib"] cstringusingencoding:0x4],  0x2); command alias Reveal_start expr (void) [(nsnotificationcenter*) [nsnotificationcenter Defaultcenter] postnotificationname:@"Ibarevealrequeststart" object:Nil];command alias Reveal_stop expr (void) [( nsnotificationcenter*) [nsnotificationcenter Defaultcenter] postnotificationname:@"Ibarevealrequeststop" object:nil];  

The above file creates 4 commands:

reveal_load_sim,reveal_load_dev, reveal_start 和 reveal_stop
  • reveal_load_simThis only works on the iOS emulator. It finds and loads Libreveal.dylib from the reveal application bundle (make sure you have reveal installed into the application folder of the system, and if you change the location, you modify the above file).

  • reveal_load_devThis command is available on both the iOS device and the emulator. However, it requires you to add Libreveal.dylib to the copy Bundle resources in build phase, making sure that it is not placed in the link Binary with libraries.

  • reveal_startThis command issues a notification to start reveal Server.

  • reveal_stopThis command issues a notification to stop reveal Server.

Please note: Only after the iOS app has issued a uiapplicationdidfinishlaunchingnotification notification, such as the app's delegate has processed application:: Didfinishlaunchingwithoptions: Before calling the above reveal_load_* command, then calling Reveal_start

After the device is up, you can break the application and enter the above command in the Lldb prompt box.

The above procedure also requires manual input, and the following describes how to set conditional breakpoints so that reveal is loaded automatically after startup.

Add a breakpoint to the code in your app's application:didfinishlaunchingwithoptions, then right-click and select Edit Breakpoint.

Enter the same command as:

Rerun the application if the console outputs the following information:

 Reveal server started.

Description reveal has been automatically loaded successfully.

Load Method (3)

Reveal advanced tips for viewing any app shows tips on how to view any app on your jailbreak device:

    • iOS device needs jailbreak, iOS6 above
    • Install the reveal, jailbreak device with the reveal Mac installed in the same wifi.
    • Click menu Help/show Reveal Library in Finder, get Libreveal.dylib
    • Uploading Libreveal.dylib to the device's/library/mobilesubstrate/dynamiclibraries
    • Edit and upload a libreveal.plist, format and/library/mobilesubstrate/dynamiclibraries below the other plist similar to the filter bundle written to view the iOS The bundle Id of the app. The format is as follows:

      {Filter = {Bundles = ("bundle Id of the app you want to view");};}

    • Restart your iOS device

Summary

This paper briefly introduces the functions of reveal and several loading methods. Welcome to experience the powerful features of reveal. Finally, you can look at the tips:reveal tips:navigation about Reveal.

Reveal: A powerful tool for analyzing iOS UI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.