<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreHID",
  "identifier" : "/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core HID"
    ],
    "preciseIdentifier" : "s:7CoreHID16HIDDeviceManagerC22DeviceMatchingCriteriaV"
  },
  "title" : "HIDDeviceManager.DeviceMatchingCriteria"
}
-->

# HIDDeviceManager.DeviceMatchingCriteria

Matching criteria used to filter HID devices.

```
struct DeviceMatchingCriteria
```

## Overview

Use this class to filter the HID devices on the system using common properties, such as [`HIDUsage`](/documentation/CoreHID/HIDUsage). All matching parameters are specified using [`init(primaryUsage:deviceUsages:vendorID:productID:transport:product:manufacturer:modelNumber:versionNumber:serialNumber:uniqueID:locationID:localizationCode:isBuiltIn:extraProperties:)`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/init(primaryUsage:deviceUsages:vendorID:productID:transport:product:manufacturer:modelNumber:versionNumber:serialNumber:uniqueID:locationID:localizationCode:isBuiltIn:extraProperties:)).

Uncommon criteria not available as properties can be specified in the `extraProperties` parameter of `init`.

## Topics

### Initializers

[`init(primaryUsage: HIDUsage?, deviceUsages: [HIDUsage]?, vendorID: UInt32?, productID: UInt32?, transport: HIDDeviceTransport?, product: String?, manufacturer: String?, modelNumber: String?, versionNumber: UInt64?, serialNumber: String?, uniqueID: String?, locationID: UInt64?, localizationCode: HIDDeviceLocalizationCode?, isBuiltIn: Bool?, extraProperties: Dictionary<String, AnyObject>?)`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/init(primaryUsage:deviceUsages:vendorID:productID:transport:product:manufacturer:modelNumber:versionNumber:serialNumber:uniqueID:locationID:localizationCode:isBuiltIn:extraProperties:))

Creates one set of matching criteria for HID devices.

### Instance Properties

[`var deviceUsages: [HIDUsage]?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/deviceUsages)

A list of usages supported by the device.

[`var isBuiltIn: Bool?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/isBuiltIn)

A Boolean value that indicates whether the device is built-in to the system or external.

[`var localizationCode: HIDDeviceLocalizationCode?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/localizationCode)

A localization code that specifies the HID compliant localization code.

[`var locationID: UInt64?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/locationID)

The location ID for the device.

[`var manufacturer: String?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/manufacturer)

The manufacturer of the device.

[`var modelNumber: String?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/modelNumber)

The model number for the device.

[`var primaryUsage: HIDUsage?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/primaryUsage)

The HID specification compliant usage for the device.

[`var product: String?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/product)

The product name for the device.

[`var productID: UInt32?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/productID)

The product ID for the device.

[`var serialNumber: String?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/serialNumber)

The serial number of the device.

[`var transport: HIDDeviceTransport?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/transport)

The data transport for the device.

[`var uniqueID: String?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/uniqueID)

A unique ID for the device.

[`var vendorID: UInt32?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/vendorID)

The vendor ID for the device.

[`var versionNumber: UInt64?`](/documentation/CoreHID/HIDDeviceManager/DeviceMatchingCriteria/versionNumber)

The version of the device.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)