---
title: "centralManager(_:didDisconnectFrom:error:)"
framework: Playground Bluetooth
role: symbol
role_heading: Instance Method
platforms: [xcode 10.2+, swift playgrounds 2.0+]
path: playgroundbluetooth/playgroundbluetoothcentralmanagerdelegate/3029476-centralmanager
---

# centralManager(_:didDisconnectFrom:error:)

Tells the delegate that the central manager disconnected from a peripheral.

## Declaration

```swift
func centralManager(_ centralManager: PlaygroundBluetoothCentralManager, didDisconnectFrom peripheral: CBPeripheral, error: Error?)
```

## Parameters

- `centralManager`: The central manager that disconnected from a peripheral.
- `peripheral`: The peripheral that the central manager disconnected from.
- `error`: An error which, if present, describes the reason for the connection failure. The absence of an error indicates that the disconnection was requested via the manager’s doc://com.apple.documentation/documentation/playgroundbluetooth/playgroundbluetoothcentralmanager/3029469-disconnect method.

## See Also

### Handling Disconnects

- [centralManager(_:didFailToConnectTo:error:)](playgroundbluetooth/playgroundbluetoothcentralmanagerdelegate/3029480-centralmanager.md)
