Language

AAUsbAccessoryOpenCompletionHandler Delegate

Definition

A completion handler for opening a USB accessory.

public delegate void AAUsbAccessoryOpenCompletionHandler(IntPtr device, NSError? error);
type AAUsbAccessoryOpenCompletionHandler = delegate of nativeint * NSError -> unit

Parameters

device
IntPtr

nativeint

A live IOUSBHostDevice handle that remains valid until the accessory is closed.

error
NSError

The error that was encountered, or null if no error occurred.

Remarks

IOUSBHost is not bound in macios, so this handle is surfaced as a raw IntPtr. To perform USB I/O, hand the accessory to a native/Swift service via CreateXpcRepresentation() or bridge the handle through native IOUSBHost code.

Applies to