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

# terminate()

Terminates any running instance of the application.

## Declaration

```swift
func terminate()
```

## Discussion

Discussion If the application has an existing debug session via Xcode, the debugger sends a command to terminate the application. Otherwise, an appropriate platform-specific mechanism terminates the process.
