Comment by williamcotton

2 years ago

It has to hand over the reigns to the Objective-C runtime to allow for all the messages being passed between objects.

I’m not sure you want to spend your time rewriting what NSApp is doing!

The runtime knows how to do that already. -[NSApplication run] sets up the runloop to drain events among other things.