<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IOUSBHost",
  "identifier" : "/documentation/IOUSBHost/IOUSBGetContainerIDDescriptor(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "IOUSBHost"
    ],
    "preciseIdentifier" : "c:@F@IOUSBGetContainerIDDescriptor"
  },
  "title" : "IOUSBGetContainerIDDescriptor(_:)"
}
-->

# IOUSBGetContainerIDDescriptor(_:)

Obtains the first container ID capability descriptor in a BOS descriptor.

```
func IOUSBGetContainerIDDescriptor(_ bosDescriptor: UnsafePointer<IOUSBBOSDescriptor>!) -> UnsafePointer<IOUSBDeviceCapabilityContainerID>!
```

## Parameters

`bosDescriptor`

A BOS descriptor that contains the descriptors to iterate through.

## Return Value

A container ID capability descriptor pointer, or `nil` if no matching descriptor returns.

## Discussion

This method uses [`IOUSBGetNextCapabilityDescriptorWithType(_:_:_:)`](/documentation/IOUSBHost/IOUSBGetNextCapabilityDescriptorWithType(_:_:_:)) to find the first container ID capability descriptor.

---

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)