Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

up vote 9 down vote accepted

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 Contentes/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 prorgam 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 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 ;-)

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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