As I continue to work on playground book prep, I decided I couldn’t live without perfectly rendered playground value history and XPC live view caps. Instead of using a screenshot-trim approach, I figured I could render views directly to disk.
I expanded my Xcode word-wrap plugin to add a new Dump Views option. This menu choice performs a recursive descent of the IDE workspace to find instances of DVTControllerContentView and IDEToyHostingView_timeline. It saves view snapshots to a folder on my desktop
Interestingly, my preliminary rendering was a little wonky for simulator-supported XCPShowView results. This only happens for iOS simulator-driven presentations and I suspect its is because iOS-native graphics use a top-left origin vs the bottom-left Quartz system.
If you’d like to really explore Xcode at a deep level, John Holdsworth has done some master work on the subject. Check out hits Xprobe repo over at github. He writes, “Welcome to the club of those that hack Xcode. Xprobe allows you to browse around the Xcode internals presented as a web page. Load up the plugin then load a project and use “Product/Xprobe/Xcode” as a start. Click on the links to view the objects/properties/method.”