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.

  • This is on-topic because it's simple resource hacking and requires no programming skills, therefore isn't programming. We just want to tweak and fix third party applications we don't have the source code to. – Daniel Beck Jun 26 '11 at 20:17
  • Awesome question. Thank you very much. Having a go at the puke turquoise of Airfoil 5 right now. Whatever happened to tasteful grey and chrome? – Foliovision Apr 10 '18 at 23:29

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.

It's 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.

enter image description here

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.

enter image description here

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:

enter image description here

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 .nib files.

That means, you can resize the windows defined in these files:

enter image description here

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 ;-)

  • Unfortunately, the PandoraJam developers resize the window in code after it has been loaded, to editing its MainMenu.nib doesn't work. – Daniel Beck Jun 26 '11 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.