---
title: "centralManager(_:didDisconnectPeripheral:error:)"
framework: corebluetooth
role: symbol
role_heading: Instance Method
path: "corebluetooth/cbcentralmanagerdelegate/centralmanager(_:diddisconnectperipheral:error:)"
---

# centralManager(_:didDisconnectPeripheral:error:)

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

## Declaration

```swift
optional func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: (any Error)?)
```

## Parameters

- `central`: The central manager that provides this information.
- `peripheral`: The now-disconnected peripheral.
- `error`: The cause of the failure, or nil if no error occurred.

## Discussion

Discussion The manager invokes this method when disconnecting a peripheral previously connected with the connect(_:options:) method. The error parameter contains the reason for the disconnection, unless the disconnect resulted from a call to cancelPeripheralConnection(_:). After this method executes, the peripheral device’s CBPeripheralDelegate object receives no further method calls. All services, characteristics, and characteristic descriptors a peripheral become invalidated after it disconnects.

## See Also

### Monitoring Connections with Peripherals

- [centralManager(_:didConnect:)](corebluetooth/cbcentralmanagerdelegate/centralmanager(_:didconnect:).md)
- [centralManager(_:didFailToConnect:error:)](corebluetooth/cbcentralmanagerdelegate/centralmanager(_:didfailtoconnect:error:).md)
- [centralManager(_:connectionEventDidOccur:for:)](corebluetooth/cbcentralmanagerdelegate/centralmanager(_:connectioneventdidoccur:for:).md)
