Instance Property

arguments

Sets the command arguments that should be used to launch the executable.

Declaration

@property(copy) NSArray<NSString *> *arguments;

Parameters

arguments

An array of NSString objects that supplies the arguments to the task. If arguments is nil, an NSInvalidArgumentException is raised.

Discussion

The NSTask object converts both path and the strings in arguments to appropriate C-style strings (using fileSystemRepresentation) before passing them to the task via argv[] . The strings in arguments do not undergo shell expansion, so you do not need to do special quoting, and shell variables, such as $PWD, are not resolved.

See Also

Returning Task Information

currentDirectoryPath

Sets the current directory for the receiver.

Deprecated
environment

Sets the environment for the receiver.

launchPath

Sets the receiver’s executable.

Deprecated
processIdentifier

Returns the receiver’s process identifier.

standardError

Sets the standard error for the receiver.

standardInput

Sets the standard input for the receiver.

standardOutput

Sets the standard output for the receiver.