---
title: "peripheral(_:didDiscoverDescriptorsFor:error:)"
framework: corebluetooth
role: symbol
role_heading: Instance Method
path: "corebluetooth/cbperipheraldelegate/peripheral(_:diddiscoverdescriptorsfor:error:)"
---

# peripheral(_:didDiscoverDescriptorsFor:error:)

Tells the delegate that the peripheral found descriptors for a characteristic.

## Declaration

```swift
optional func peripheral(_ peripheral: CBPeripheral, didDiscoverDescriptorsFor characteristic: CBCharacteristic, error: (any Error)?)
```

## Parameters

- `peripheral`: The peripheral providing this information.
- `characteristic`: The characteristic to which the characteristic descriptors belong.
- `error`: The reason the call failed, or nil if no error occurred.

## Discussion

Discussion Core Bluetooth invokes this method when your app calls the discoverDescriptors(for:) method. If the peripheral successfully discovers the descriptors of the specified characteristic, you can access them through the characteristic’s descriptors property. If successful, the error parameter is nil. If unsuccessful, the error parameter returns the cause of the failure.

## See Also

### Discovering Characteristics and their Descriptors

- [peripheral(_:didDiscoverCharacteristicsFor:error:)](corebluetooth/cbperipheraldelegate/peripheral(_:diddiscovercharacteristicsfor:error:).md)
