Ben Reeves Ben Reeves - 3 months ago 15
Objective-C Question

Run NSRunLoop in a Cocoa command-line program

Is it possible to initialize a

NSRunLoop
without loading any NIB files (i.e., without calling
NSApplicationMain()
)?

Thanks.

Answer

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.