---
title: launch()
framework: xcuiautomation
role: symbol
role_heading: Instance Method
path: xcuiautomation/xcuiapplication/launch()
---

# launch()

Launches the application.

## Declaration

```swift
func launch()
```

## Discussion

Discussion This call is synchronous. When it returns, the application launches and is ready to handle user events. The system reports any failure in the launch sequence as a test failure and halts the test at this point. If the application is already running, this call terminates the existing instance, to ensure a clean launch state for the newly launched instance.

## See Also

### Launching the application

- [launchArguments](xcuiautomation/xcuiapplication/launcharguments.md)
- [launchEnvironment](xcuiautomation/xcuiapplication/launchenvironment.md)
- [open(_:)](xcuiautomation/xcuiapplication/open(_:).md)
