<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 2.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCaptureDevice/init(uniqueID:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCaptureDevice(cm)deviceWithUniqueID:"
  },
  "title" : "init(uniqueID:)"
}
-->

# init(uniqueID:)

Creates an object that represents a device with the specified identifier.

```
init?(uniqueID deviceUniqueID: String)
```

## Parameters

`deviceUniqueID`

An identifier that uniquely identifies the device.

## Return Value

A capture device, or `nil` if no device with the specified identifier exists.

## Discussion

Every capture device has a unique identifier that persists on a system across device connections, app restarts, and reboots of the system itself.

---

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)