One Logo Pool Ball
HealthKit · IOS API REFERENCE

HKAttachmentDataReader

class · iOS 16.0+ · SDK 27.1

class HKAttachmentDataReader

The HKAttachmentDataReader class provides an interface for accessing the data of an HKAttachment object.

Members (4)

get · iOS 16.0+

attachment

TypeScript
get attachment(): HKAttachment
Swift declaration
var attachment: HKAttachment { get }

The attachment for which to read data.

get · iOS 16.0+

data

TypeScript
get data(): Promise<ArrayBuffer>
Swift declaration
var data: Data { get async throws }

The `Data` of the receiver's `attachment` property. Prefer `bytes` for large files that support incremental reading to limit your app's peak memory usage.

get · iOS 16.0+

bytes

TypeScript
get bytes(): HKAttachment_AsyncBytes
Swift declaration
var bytes: HKAttachment.AsyncBytes { get }

An ordered async sequence of bytes for the receiver's `attachment` property.

get · iOS 16.0+

progress

TypeScript
get progress(): _Foundation_Progress
Swift declaration
var progress: Progress { get }

Tracks the progress of downloading the file from iCloud. An `HKAttachment`'s file may not always be available locally, and could be stored in iCloud.

Skipped declarations

No declarations were skipped in this snapshot.

All HealthKit types →