Peeking Under the Hood; NIB Files Exposed
Friday November 14, 2008
I continue to work on my iPhone application and out of curiosity today copied the .NIB file for it over to my Windows box. I'm still feeling my round the Mac and as I have various utilities on the PC and both of them networked, it took just 30 seconds to peer inside. I had guessed that it might be a structured text file and sure enough it turns out to be XML. Most languages that let you edit controls visually (as in the Interface Builder) use some form of structured text and increasingly it's XML. Delphi used a type of resource file for its forms but you could view them in text and eventually from Delphi 5 switched over to text only.
This is interesting as it means that with a bit of work, you could create NIB files without using Interface Builder. It's not a bad tool but two tools are better than one! Here is part of the file to give you a flavor.
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="9"/>
</object>


Comments
Hello. And Bye.