Do not modify the Xcode project load reveal

Source: Internet
Author: User

With regard to the iOS UI debugging tool reveal configuration, many beginner friends may search the Internet for some articles, most of which are about how to configure the Xcode project, by adding some library files, and in the program to write additional code to invoke the reveal service, This ensures that the project can be attached to the reveal for analysis when the program is debugged.

This is cumbersome, and every project needs to repeat these tedious steps, which is unbearable. To this end, in the next through a number of analysis attempts, finally found a way to once and for all. Let's introduce this method to you now. This method was not invented by me, this is the method provided by reveal official documentation. But there is little mention on the internet, I am here to introduce this method to you. This method invokes the reveal service through the Xcode Breakpoint command, and then guarantees that the reveal can be attached at any time when the program is running in the emulator, which makes it easy to analyze the hierarchy of the UI. This method only needs to be configured for Xcode once, since then, reveal can be used at any time, which is extremely convenient, avoids every tedious project configuration, and does not need to write any code. Here I will give you a detailed introduction to the specific configuration method.

If you have not installed reveal, it is recommended to install the trial from the official download.

The reveal version used in this article is 1.5.1

Here are the detailed configuration steps:

1. Open an iOS project in Xcode and select the menu item view→navigators→show Breakpoint Navigator. The steps are as follows:


2. Under the navigation panel on the left, click "+" and select the "Add Symbolic Breakpoint" menu item as shown:



3. Fill in the "Uiapplicationmain" in the symbol field of the popup panel, such as:



4. Click the Add Action button, such as:



5. Copy the following command paste to the edit box shown in:

expr (Class)NSClassFromString(@"IBARevealLoader") == nil ? (void *)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2) : ((void*)0)

As shown in the following:



In the above command, there is a path string

/applications/reveal.app/contents/sharedsupport/ios-libraries/libreveal.dylib

Make sure that the file referred to by this string exists on disk (normally, if you install reveal to the application directory, there is no problem here).

6. Tick the automatically continue after evaluating actions option .



7. After completing the above steps, right-click on the newly created breakpoint and pop up the following menu and select as shown:




Now, all the configuration steps are complete. After any project analysis, you can start reveal and analyze directly.

Now start a project debugging, the Xcode console will output the following log, indicating that the configuration is correct, reveal has been able to start using normally, as shown in:


Next start reveal, such as Operation:


Let's try reveal's tough:




In the above demo demo, it is enough to illustrate the power and convenience of reveal, a variety of hierarchical structure at a glance, especially for those irregular UI implementation, can be easily analyzed.

Do not modify the Xcode project load reveal

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.