---
title: "readValue(for:)"
framework: corebluetooth
role: symbol
role_heading: Instance Method
path: "corebluetooth/cbperipheral/readvalue(for:)-6u2kr"
---

# readValue(for:)

Retrieves the value of a specified characteristic.

## Declaration

```swift
func readValue(for characteristic: CBCharacteristic)
```

## Parameters

- `characteristic`: The characteristic whose value you want to read.

## Discussion

Discussion When you call this method to read the value of a characteristic, the peripheral calls the peripheral(_:didUpdateValueFor:error:) method of its delegate object. If the peripheral successfully reads the value of the characteristic, you can access it through the characteristic’s value property. Not all characteristics have a readable value. You can determine whether a characteristic’s value is readable by accessing the relevant properties of the CBCharacteristicProperties enumeration.

## See Also

### Reading Characteristic and Descriptor Values

- [readValue(for:)](corebluetooth/cbperipheral/readvalue(for:)-91hhp.md)
