---
title: value
framework: corebluetooth
role: symbol
role_heading: Instance Property
path: corebluetooth/cbattrequest/value
---

# value

The data that the central reads from or writes to the peripheral.

## Declaration

```swift
var value: Data? { get set }
```

## Discussion

Discussion The value of this property depends on whether the request type is read or write. For read requests, the property is nil, and you should set it before responding to the remote central through the respond(to:withResult:) method. For write requests, the value is the data to write to the characteristic’s value.

## See Also

### Requesting to Read and Write Characteristic Values

- [central](corebluetooth/cbattrequest/central.md)
- [characteristic](corebluetooth/cbattrequest/characteristic.md)
- [offset](corebluetooth/cbattrequest/offset.md)
