<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "IOUSBHost",
  "identifier" : "/documentation/IOUSBHost/IOUSBHostPipe/enqueueIORequest(with:frameList:frameListCount:firstFrameNumber:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "IOUSBHost"
    ],
    "preciseIdentifier" : "c:objc(cs)IOUSBHostPipe(im)enqueueIORequestWithData:frameList:frameListCount:firstFrameNumber:error:completionHandler:"
  },
  "title" : "enqueueIORequest(with:frameList:frameListCount:firstFrameNumber:completionHandler:)"
}
-->

# enqueueIORequest(with:frameList:frameListCount:firstFrameNumber:completionHandler:)

Enqueues a request on an isochronous endpoint.

```
func enqueueIORequest(with data: NSMutableData, frameList: UnsafeMutablePointer<IOUSBHostIsochronousFrame>, frameListCount: Int, firstFrameNumber: UInt64, completionHandler: (@Sendable (IOReturn, UnsafeMutablePointer<IOUSBHostIsochronousFrame>) -> Void)? = nil) throws
```

```
func enqueueIORequest(with data: NSMutableData, frameList: UnsafeMutablePointer<IOUSBHostIsochronousFrame>, frameListCount: Int, firstFrameNumber: UInt64) async throws -> (IOReturn, UnsafeMutablePointer<IOUSBHostIsochronousFrame>)
```

## Parameters

`data`

An <doc://com.apple.documentation/documentation/Foundation/NSMutableData> object defining the memory to use for the transfer.

`frameList`

A pointer to the first element in an [`IOUSBHostIsochronousFrame`](/documentation/IOUSBHost/IOUSBHostIsochronousFrame) array. The array must contain at least `frameListCount` elements.

`frameListCount`

The number of elements in `frameList`.

`firstFrameNumber`

The frame number the request should begin on. Query the current frame number with [`frameNumberWithTime:`](/documentation/IOUSBHost/IOUSBHostObject/frameNumberWithTime:). If `0`, the transfer starts on the next available frame (XHCI only).

`completionHandler`

An [`IOUSBHostIsochronousCompletionHandler`](/documentation/IOUSBHost/IOUSBHostIsochronousCompletionHandler) that runs when the request completes, or times out if the call returns successfully. The `completionHandler` doesn’t run if the method returns with an error.

## Return Value

`YES` if the request queues successfully; otherwise, `NO`.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> func enqueueIORequest(with data: NSMutableData, frameList: UnsafeMutablePointer<IOUSBHostIsochronousFrame>, frameListCount: Int, firstFrameNumber: UInt64) async throws -> (IOReturn, UnsafeMutablePointer<IOUSBHostIsochronousFrame>)
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

This method issues asynchronous isochronous requests. The caller allocates and initializes an array of [`IOUSBHostIsochronousFrame`](/documentation/IOUSBHost/IOUSBHostIsochronousFrame) structures to describe the transferred frames.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)