How To: Edit .nib Files in Snow Leopard

Following my previous tutorial about How To Get Vertical Tabs on Safari 4, you may have wondered how I succesfully managed to edit the browser's .nib file using Interface Builder.

With the release of Mac OS X Snow Leopard, Apple decided to make it more difficult for advanced users to edit .nib files: that's part of how they built SL to have a smaller footprint. Indeed, if you try to edit Safari' Browser.nib file, Interface Builder will say that it cannot open complied .nib files.

As always, there's a workaround for that.

And that's pretty simple this time: all you need is to find an editable .nib file. And here comes the hard part: most of SL applications haven't got editable .nibs, they are all already compiled.

So, how did I edit that .nib yesterday? Luck, I guess.

I found out that Hulu Desktop.app has an integrated crash reported inside its Resources and the crash reporter's .nib isn't compiled. As you can see from the screenshot below, an editable .nib comes with two additional files, info.nib and classes.nib, which make the file totally editable with Interface Builder.

For this reason, to edit Safari's .nib I just made a copy of that crash reporter, opened it and replaced Hulu's keyedobjects.nib with the Safari one. I edited it, then I re-opened UKCrashReporter.nib, copied the file and pasted it into Safari Resources.

ukcrashreporternib

ukcrashreporternib

resources

resources

That's it. I believe this workaround works with every keyedobjects.nib file, just make sure you have an editable .nib file to start with. I just found out that Hulu's has got it.

So, download Hulu Desktop.app here, or simply download the editable .nib file (UKCrashReporter.nib) here.

Enjoy :)