---
title: launch()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/process/launch()
---

# launch()

Launches the task represented by the receiver.

## Declaration

```swift
func launch()
```

## Discussion

Discussion Raises an NSInvalidArgumentException if the launch path has not been set or is invalid or if it fails to create a process.

## See Also

### Related Documentation

- [waitUntilExit()](foundation/process/waituntilexit().md)
- [terminate()](foundation/process/terminate().md)

### Deprecated

- [launchedProcess(launchPath:arguments:)](foundation/process/launchedprocess(launchpath:arguments:).md)
- [currentDirectoryPath](foundation/process/currentdirectorypath.md)
- [launchPath](foundation/process/launchpath.md)
