How can I edit the user interfaces of Mac OS X programs? I'd like to tweak settings for some programs, things like window sizes.
Mac OS X applications that are created using Xcode had their GUI commonly designed using Interface Builder (now integrated in Xcode 4).
The GUI definitions are stored in files with the extension
.nib and in the
Contents/Resources directory of the finished application bundle. These files can be edited using Interface Builder as they're not compiled in the same way source code files are.
The following example edits the About window definition file of Reeder, a commercial RSS/ATOM reader.
Reeder.app/Contents/Resources/About.nib. If we open this file in Interface Builder, it will not display. For some time,
.nib files are distributed in a "compiled" form, maybe because editing them was too widespread.
To be able to edit the
.nib files, we need to "decompile" them using e.g. this program called NibDecompiler. Download and copy the
NibDecompiler.workflow file to
~/Library/Services. Now there'll be a NibCompiler context menu entry on files which we can use to make the
.nib files editable.
Create a copy of Reeder's
Reeder.app/Contents/Resources/About.nib on your desktop, "decompile" it from its context menu, and open it in Interface Builder or Xcode 4.
Now you can edit, for example, the label containing the program name. Save, and replace the original file in Reeder's application bundle. Launch Reeder and see for yourself:
We can clearly see in the editor, that not everything is designed in Interface Builder. Some applications can create their whole UI in code, and don't need
.nib files at all. Others create only the most elaborate parts of some windows in code. We can only edit using this approach what was designed in the
That means, you can resize the windows defined in these files:
But if their contents are created programmatically, don't be disappointed in the devs didn't develop with your changes in mind and e.g. layout breaks.
Editing resources will break code-signing, which is used for the OS X Firewall and, AFAIK, Keychain authentication (to allow access after application updates automatically).
Since some applications load the
.nib and then perform some additional changes (e.g. inserting the version number into the About dialog), you might actually break some functionality when you do this. You probably shouldn't do this at all, actually ;-)