Skip to content

marcransome/MRWorker

Repository files navigation

MRWorker

Build Status

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];

Project integration

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

Contributions

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.

License

MRWorker is provided under the terms of the MIT License.

Contact

Email me at marc.ransome@fidgetbox.co.uk or create an issue.

About

A tiny Objective-C library for launching command-line programs and observing their output.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published