Is it possible to initialize a NSRunLoop without loading any NIB files (i.e., without calling NSApplicationMain())?
Thanks.
In Swift, you can achieve this by appending the following line to the end of your main.swift:
NSRunLoop.currentRunLoop().run(); // Swift < 3.0
RunLoop.current.run(); // Swift >= 3.0
If you want to be able to stop the run loop you have to use the Core Foundation methods.
CFRunLoopRun(); // start
And you can stop it like this
CFRunLoopStop(CFRunLoopGetCurrent()); // stop