<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceCheck",
  "identifier" : "/documentation/DeviceCheck/DCError-swift.struct/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "DeviceCheck"
    ],
    "preciseIdentifier" : "c:@E@DCError"
  },
  "title" : "DCError.Code"
}
-->

# DCError.Code

DeviceCheck error codes.

```
enum Code
```

## Topics

### Error codes

[`case featureUnsupported`](/documentation/DeviceCheck/DCError-swift.struct/Code/featureUnsupported)

DeviceCheck is unavailable on this device.

[`case invalidInput`](/documentation/DeviceCheck/DCError-swift.struct/Code/invalidInput)

An error code that indicates when your app provides data that isn’t
formatted correctly.

[`case invalidKey`](/documentation/DeviceCheck/DCError-swift.struct/Code/invalidKey)

An error caused by a failed attempt to use the App Attest key.

[`case serverUnavailable`](/documentation/DeviceCheck/DCError-swift.struct/Code/serverUnavailable)

An error that indicates a failed attempt to contact the App Attest service
during an attestation.

[`case unknownSystemFailure`](/documentation/DeviceCheck/DCError-swift.struct/Code/unknownSystemFailure)

A failure has occurred, such as the failure to generate a token.

### Initializers

[`init?(rawValue: Int)`](/documentation/DeviceCheck/DCError-swift.struct/Code/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)