/TCTaskWrapper

A NSTask Wrapper for Mac OS X

Primary LanguageObjective-CMIT LicenseMIT

TCTaskWrapper

A NSTask Wrapper for Mac OS X

Install

Add as git Module

git submodule add git@github.com:TheCodeEngine/TCTaskWrapper.git
git submodule init

Syncron Task

To run a syncron Task

NSError *taskRUnError;
TCTaskWrapper *task = [[TCTaskWrapper alloc] initWithTaskPath:[NSURL URLWithString:@"/bin/ls"] arguments:@[@"-l"]];
if ( ![task runTaskSyncronError:&taskRUnError] ) {
    // Task has Error
}
else
{
    // Task Exit
    NSString *outDataString = [task outPutDataToString];
}

License

TCTaskWrapper is is licensed under the MIT license. See the LICENSE file in the project root for the full text.