Search code examples
apportable

How can I dump the view hierarchy from within an Apportable app?


Using the Apple private API, [view recursiveDescription] returns nil on Apportable, how can I dump the view hierarchy? Is it possible, short of building it by hand?


Solution

  • From gdb : print [[[UIApplication sharedApplication] keyWindow] dumpGeometry:0] will output the hierarchy to logcat.

    Also to use Android's hierarchyviewer:

    • Build with VIEW_SERVER=yes (or use 'google' labeled Nexus 7)
    • Start hierarchyviewer (.apportable/toolchain/macosx/android-sdk/tools/hierarchyviewer)