<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreHID",
  "identifier" : "/documentation/CoreHID/HIDDeviceClient/seizeDevice()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core HID"
    ],
    "preciseIdentifier" : "s:7CoreHID15HIDDeviceClientC11seizeDeviceyyKF"
  },
  "title" : "seizeDevice()"
}
-->

# seizeDevice()

Attempt to obtain the device so that this client is the only active client.

```
func seizeDevice() throws
```

## Discussion

If successful, this client is the only one that receives notifications using [`monitorNotifications(reportIDsToMonitor:elementsToMonitor:)`](/documentation/CoreHID/HIDDeviceClient/monitorNotifications(reportIDsToMonitor:elementsToMonitor:)), and the only one that can use certain functions to interact with the device. The device won’t be freed until the client that holds it is deinitialized.
There must not be any outstanding calls when attempting to seize a device.

> Throws: ``doc://com.apple.CoreHID/documentation/CoreHID/HIDDeviceError`` if the attempt to seize the device is unsuccessful. Notably, ``doc://com.apple.CoreHID/documentation/CoreHID/HIDDeviceError/busy`` is thrown if there are outstanding calls to ``doc://com.apple.CoreHID/documentation/CoreHID/HIDDeviceClient/monitorNotifications(reportIDsToMonitor:elementsToMonitor:)``, ``doc://com.apple.CoreHID/documentation/CoreHID/HIDDeviceClient/dispatchSetReportRequest(type:id:data:timeout:)``, ``doc://com.apple.CoreHID/documentation/CoreHID/HIDDeviceClient/dispatchGetReportRequest(type:id:timeout:)``, or ``doc://com.apple.CoreHID/documentation/CoreHID/HIDDeviceClient/updateElements(_:timeout:)``; and ``doc://com.apple.CoreHID/documentation/CoreHID/HIDDeviceError/exclusiveAccess`` is thrown if the device is currently seized by another client.

---

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)