Wednesday, October 7, 2015

Reveal app shows more UI details than xcode

Reveal is an app that you can get (from here) that can take a snapshot of your running app and show all the items that are in it, even if they are hidden or in the background. xcode does have "debug view hierarchy" that does a pretty good job but if you need more detail than that, reveal is for you.

In the latest xcode (7) there is a bit of a connection problem. Specifically with the plugin as it was made for xcode 5 it seems. So to manually get reveal connected to your simulation, you can pause the app while it is running and run the command in the debug commands (lldb);

expr (void*)dlopen("/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib", 0x2);

expr [(NSNotificationCenter*)[NSNotificationCenter defaultCenter] postNotificationName:@"IBARevealRequestStart" object:nil];


continue;

You might need to enter each line one at a time for it to work. 

After that, you should be able to goto the reveal app, attach it to the simulator and hit the refresh button and tada!