I recently received an email from Steve Jobs. He told me that he has read all of my blog posts. I found this ridiculous, so I replied, “You’re full of it!” Shockingly, he wrote back. “Actually,” he said, “all of the new apps of the past few years are nibless.” He then described the Apple-sanctioned technique of writing a nibless application.
In previous posts of this series, I was forced to use obscure workarounds such as
+[NSObject poseAsClass:] and
method_exchangeImplementations() to prevent
NSApplicationMain() from trying to load a nib. Jordy Rose of Belkadan Software suggested to me that the easiest way to prevent
NSApplicationMain() from trying to load a nib would be to avoid calling
NSApplicationMain() at all. Instead, you would just call
-[NSApplication run]. However, I was worried that
NSApplicationMain() might do something else important (like phone home to get permission to launch). We don’t know, because we don’t have the source code.
I’m still waiting for the source code, but Steve did indicate that it was safe to skip
NSApplicationMain(). Thus, there’s no need for tricksy runtime manipulation, except perhaps to prove your mad programming skills. Mad, that is, in the sense of having worn one ring for too long. Steve also affirmed that our call to
-[NSApplication setAppleMenu:], a method that Apple removed from the API, will continue to work until there’s a replacement API. Indeed, Apple is working on some kind of replacement. Excellent!
/me plays air guitar. So if you’re counting at home, it’s now (1) Exchange support and (2) Nibless support.
He didn’t mention the Open Recent menu, so it appears that my ugly hack is still required for non-document-based apps. This cannot be considered part of the Apple-sanctioned technique, though it is sanctioned by me, which is more desirable, because my approval comes in seven delicious flavors. I’ve updated Nibless for Leopard in light of Steve’s revelations and am making version 2.0 available for immediate download. This is major progress, because it already puts me two versions ahead of VLC.
So long, Steve, and thanks for all the fish!