---
title: data
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkattachmentdatareader/data
---

# data

The abstract’s data.

## Declaration

```swift
var data: Data { get async throws }
```

## Discussion

Discussion Use this property to asynchronously access the attachment’s data as a single data object. let data: Data do {     data = try await dataReader.data } catch {     // Handle the error here.     fatalError("*** An error occurred while accessing the attachment's data. \(error.localizedDescription) ***") }

## See Also

### Reading attachment data

- [bytes](healthkit/hkattachmentdatareader/bytes.md)
- [progress](healthkit/hkattachmentdatareader/progress.md)
