---
title: seizeDevice()
framework: corehid
role: symbol
role_heading: Instance Method
path: corehid/hiddeviceclient/seizedevice()
---

# seizeDevice()

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

## Declaration

```swift
func seizeDevice() throws
```

## Discussion

Discussion If successful, this client is the only one that receives notifications using 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. note: HIDDeviceError if the attempt to seize the device is unsuccessful. Notably, HIDDeviceError.busy is thrown if there are outstanding calls to monitorNotifications(reportIDsToMonitor:elementsToMonitor:), dispatchSetReportRequest(type:id:data:timeout:), dispatchGetReportRequest(type:id:timeout:), or updateElements(_:timeout:); and HIDDeviceError.exclusiveAccess is thrown if the device is currently seized by another client.

## See Also

### Interact with the device

- [dispatchGetReportRequest(type:id:timeout:)](corehid/hiddeviceclient/dispatchgetreportrequest(type:id:timeout:).md)
- [dispatchSetReportRequest(type:id:data:timeout:)](corehid/hiddeviceclient/dispatchsetreportrequest(type:id:data:timeout:).md)
