<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "IOUSBHost",
  "identifier" : "/documentation/IOUSBHost/IOUSBHostDevice/createMatchingDictionaryWithVendorID:productID:bcdDevice:deviceClass:deviceSubclass:deviceProtocol:speed:productIDArray:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "IOUSBHost"
    ],
    "preciseIdentifier" : "c:objc(cs)IOUSBHostDevice(cm)createMatchingDictionaryWithVendorID:productID:bcdDevice:deviceClass:deviceSubclass:deviceProtocol:speed:productIDArray:"
  },
  "title" : "createMatchingDictionaryWithVendorID:productID:bcdDevice:deviceClass:deviceSubclass:deviceProtocol:speed:productIDArray:"
}
-->

# createMatchingDictionaryWithVendorID:productID:bcdDevice:deviceClass:deviceSubclass:deviceProtocol:speed:productIDArray:

Creates a matching dictionary to find a USB device.

```
+ (CFMutableDictionaryRef) createMatchingDictionaryWithVendorID:(NSNumber *) vendorID productID:(NSNumber *) productID bcdDevice:(NSNumber *) bcdDevice deviceClass:(NSNumber *) deviceClass deviceSubclass:(NSNumber *) deviceSubclass deviceProtocol:(NSNumber *) deviceProtocol speed:(NSNumber *) speed productIDArray:(NSArray *) productIDArray;
```

## Parameters

`vendorID`

The vendor ID for the device you’re searching for.

`productID`

The product ID for the device you’re searching for.

`bcdDevice`

The release number of the device you’re searching for.

`deviceClass`

The class of the device you’re searching for.

`deviceSubclass`

The subclass of the device you’re searching for.

`deviceProtocol`

The protocol of the device you’re searching for.

`speed`

The enumeration speed of the device you’re searching for. Add the speed to any of the keys in the table below.

`productIDArray`

An array of product IDs to match against. Don’t use this parameter with the `productID` parameter.

## Return Value

A dictionary to pass to IOKit matching methods, such as <doc://com.apple.documentation/documentation/iokit/1514535-ioservicegetmatchingservice>. The caller must release this object when done.

## Discussion

The table below shows the keys you can use to make a successful matching dictionary. A plus sign (+) separates the keys to emphasize the requirement that all of the specified keys combine.

The table presents the keys in order of specificity. The first key defines the most specific search, and the last key defines the broadest search.

|Keys                                                                                                                                                                                                                                                                                                  |Notes                                                                                                                                                 |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
|<doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425819-idvendor> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1426145-idproduct> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425514-bcddevice>                |None.                                                                                                                                                 |
|<doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425819-idvendor> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1426145-idproduct>                                                                                                              |None.                                                                                                                                                 |
|<doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425819-idvendor> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425757-bdevicesubclass> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425787-bdeviceprotocol>    |Use these keys only if the device’s <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425902-bdeviceclass> is set to 0xFF.    |
|<doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425819-idvendor> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425757-bdevicesubclass>                                                                                                        |Use these keys only if the device’s <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425902-bdeviceclass> is set to 0xFF.    |
|<doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425902-bdeviceclass> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425757-bdevicesubclass> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425787-bdeviceprotocol>|Use these keys only if the device’s <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425902-bdeviceclass> is not set to 0xFF.|
|<doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425902-bdeviceclass> + <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425757-bdevicesubclass>                                                                                                    |Use these keys only if the device’s <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor/1425902-bdeviceclass> is not set to 0xFF.|

## Topics

### Properties

[`IOUSBHostMatchingPropertyKey`](/documentation/IOUSBHost/IOUSBHostMatchingPropertyKey)

Properties for implementing the matching service.

[`IOUSBHostPropertyKey`](/documentation/IOUSBHost/IOUSBHostPropertyKey)

Properties that the USB host device and interface classes share.

## See Also

[`IOUSBHostDevice`](/documentation/IOUSBHost/IOUSBHostDevice)

The class that claims and configures devices, retrieves descriptors, and sends device requests.

  <doc://com.apple.documentation/documentation/iokit/iousbdevicedescriptor>



---

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)