Visualizing XIB/NIB Files

I have been using Interface Builder to instantiate and establish connections between all of the objects in an iPhone application Atomic has been working on. At the end of the project I wanted to visualize the entire application structure and the relationships between all of the objects. Alas, there were no obvious tools or applications that I could find to do this.

As a result I created a ruby script that parses an interface builder file, builds a dot graph structure, and writes it out as an image. The script can be freely downloaded here. There are a few external dependencies that will need to be installed for it to be fully functional.

  • Port install graphiz (port install graphviz).
  • Gem install the Ruby Graphing Library (gem install rgl).
  • Ruby Cocoa must also be installed, which should be available for everyone who has MacOS X Leapord.

Graphviz is only required for writing out the image. The script also writes out a dot graph file which can be opened by Omnigraffle.

Below are two graph images from two different iPhone projects:

Large Project

Small Project

Filed in: Tools


Leave a Reply

  

  

  

Stay Connected