---
title: closeConnection()
framework: IOBluetooth
role: symbol
role_heading: Instance Method
path: iobluetooth/iobluetoothdevice/closeconnection()
---

# closeConnection()

Close down the baseband connection to the device.

## Declaration

```swift
func closeConnection() -> IOReturn
```

## Return Value

Return Value Returns kIOReturnSuccess if the connection has successfully been closed.

## Discussion

Discussion This method is synchronous and will not return until the connection has been closed (or the command failed). In the future this API will be changed to allow asynchronous operation.
