---
title: "makeDataReady(completionHandler:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avsamplebuffergeneratorbatch/makedataready(completionhandler:)"
---

# makeDataReady(completionHandler:)

Loads sample data asynchronously for all sample buffers within a batch.

## Declaration

```swift
func makeDataReady(completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func makeDataReady() async throws
```

## Parameters

- `completionHandler`: A callback the system invokes once when all sample buffers in the batch are data-ready, or when an error occurs.

## Discussion

Discussion Calling this method more than once on a batch generates an exception.
