Run NSRunLoop in a Cocoa command-line program

cocoa, objective-c

Solution

Yes; you can write your own main method and run `NSRunLoop` without returning from `NSApplicationMain`.

Have a look at this link; this guy is using NSRunLoop in his main method, he is not loading NIB files though, but it should get you going with `NSRunloops`.

Problem

Is it possible to initialize a `NSRunLoop` without loading any NIB files (i.e., without calling `NSApplicationMain()`)? Thanks.

Original source