MRWorker is a tiny Objective-C library for running command-line programs asynchronously and observing their output.
A simple example:
MRWorkerOperation *operation = [MRWorkerOperation workerOperationWithLaunchPath:@"/bin/ls" arguments:@[@"-al", @"/"] outputBlock:^(NSString *output) {
// buffer/process program output
...
} completionBlock:^(int terminationStatus) {
// respond to program termination
...
}];
[[MRWorker sharedWorker] addOperation:operation];MRWorker can be integrated into a project using CocoaPods. Add the following lines to your Podfile:
platform :osx, '10.9'
pod 'MRWorker'Then install the dependency into your project:
$ pod install
If you would like to contribute to the project, fork the repository, make your code changes, then submit a pull request with a brief description of your feature or bug fix.
MRWorker is provided under the terms of the MIT License.
Email me at marc.ransome@fidgetbox.co.uk or create an issue.