Creates a task from a shell script
- ( instancetype )initWithShellScript: ( NSString * )script;
The task object
Creates a task from a shell script
- ( instancetype )initWithShellScript: ( NSString * )script
recoverTask: ( nullable SKTask * )recover;
If a recovery task is passed, it will be executed upon failure. If the recovery task then succeed, the primary task will also succeed.
The task object
Creates a task from a shell script
- ( instancetype )initWithShellScript: ( NSString * )script
recoverTasks: ( nullable NSArray< SKTask * > * )recover NS_DESIGNATED_INITIALIZER;
If recovery tasks are passed, they will be executed upon failure, until one of them succeed. If a recovery task then succeed, the primary task will also succeed.
The task object
Creates a task from a shell script
+ ( instancetype )taskWithShellScript: ( NSString * )script;
The task object
Creates a task from a shell script
+ ( instancetype )taskWithShellScript: ( NSString * )script
recoverTask: ( nullable SKTask * )recover;
If a recovery task is passed, it will be executed upon failure. If the recovery task then succeed, the primary task will also succeed.
The task object
Creates a task from a shell script
+ ( instancetype )taskWithShellScript: ( NSString * )script
recoverTasks: ( nullable NSArray< SKTask * > * )recover;
If recovery tasks are passed, they will be executed upon failure, until one of them succeed. If a recovery task then succeed, the primary task will also succeed.
The task object
The task's delegate
@property( atomic,
readwrite,
weak ) id< SKTaskDelegate > delegate;
Called when a task has finished running @dicussion This method is optional.
- ( void )task: ( SKTask * )task didEndWithStatus: ( int )status;
Called when a task has produced output on `stdout` or `stderr` @dicussion This method is optional. Note that the output may not be whole/complete lines, as this method, if implemented by the delagete, will be called as output is captured.
- ( void )task: ( SKTask * )task didProduceOutput: ( NSString * )output
forType: ( SKTaskOutputType )type;
Called when a task has produced output on `stdout` or `stderr` @dicussion This method is optional. Note that the output may not be whole/complete lines, as this method, if implemented by the delagete, will be called as output is captured.
- ( void )task: ( SKTask * )task didProduceOutput: ( NSString * )output
forType: ( SKTaskOutputType )type;
Called when a task is about to be run @dicussion This method is optional.
- ( void )taskWillStart: ( SKTask * )task;
The type of output of a task
typedef NS_ENUM( NSInteger, SKTaskOutputType ) {
SKTaskOutputTypeStandardOutput,
SKTaskOutputTypeStandardError
};
Used to differenciate output comming from a task's `stdout` or `stderr`.
The type of output of a task
typedef NS_ENUM( NSInteger, SKTaskOutputType ) {
SKTaskOutputTypeStandardOutput,
SKTaskOutputTypeStandardError
};
Used to differenciate output comming from a task's `stdout` or `stderr`.