<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VisionKit",
  "identifier" : "/documentation/VisionKit/DataScannerViewController/ScanningUnavailable",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit25DataScannerViewControllerC19ScanningUnavailableO"
  },
  "title" : "DataScannerViewController.ScanningUnavailable"
}
-->

# DataScannerViewController.ScanningUnavailable

The possible reasons the data scanner is unavailable.

```
enum ScanningUnavailable
```

## Topics

### Unavailable errors

[`case unsupported`](/documentation/VisionKit/DataScannerViewController/ScanningUnavailable/unsupported)

The data scanner isn’t supported on this device.

[`case cameraRestricted`](/documentation/VisionKit/DataScannerViewController/ScanningUnavailable/cameraRestricted)

The data scanner isn’t available due to user restrictions on the use
of the camera.

### Localizing errors

### Hashing and comparing

## See Also

[`func dataScanner(DataScannerViewController, becameUnavailableWithError: DataScannerViewController.ScanningUnavailable)`](/documentation/VisionKit/DataScannerViewControllerDelegate/dataScanner(_:becameUnavailableWithError:))

Responds when the data scanner becomes unavailable and stops scanning.

## Relationships

### Conforms To

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

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

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

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

[`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)