<!--
{
  "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/DCDevice",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "DeviceCheck"
    ],
    "preciseIdentifier" : "c:objc(cs)DCDevice"
  },
  "title" : "DCDevice"
}
-->

# DCDevice

A representation of a device that provides a unique, authenticated token.

```
class DCDevice
```

## Overview

Use the shared instance of the `DCDevice` class to generate a
token that identifies a device. Call the
[`generateToken(completionHandler:)`](/documentation/DeviceCheck/DCDevice/generateToken(completionHandler:)) method to get
the token, and then send it to your server:

```swift
if DCDevice.current.isSupported { // Always test for availability.
    DCDevice.current.generateToken { token, error in
        guard error == nil else { /* Handle the error. */ }

        // Send the token to your server.
    }
}
```

On your server, combine the token with an authentication key that you obtain
from Apple, and use the result to request access to two per-device binary
digits (bits). After authenticating the device, Apple passes the current
values of the bits, along with the date they were last modified, to your
server. Your server applies its business logic to this information and
communicates the results to your app. For more information about server-side
procedures, see [Accessing and modifying per-device data](/documentation/DeviceCheck/accessing-and-modifying-per-device-data).

> Note: To use the `DCDevice` class, your app must have an app
> ID that you register on the 
> [Apple
> Developer](https://developer.apple.com/account/) website.

Apple records the bits for you, and reports the bits back to you, but you’re
responsible for keeping track of what the bits mean. You’re also responsible
for determining when to reset the bits for a given device; for example, when
a user sells the device to someone else.

## Topics

### Getting the current device

[`current`](/documentation/DeviceCheck/DCDevice/current)

A representation of the device for which you want to query the two bits of
data.

### Determining API support

[`isSupported`](/documentation/DeviceCheck/DCDevice/isSupported)

A Boolean value that indicates whether the device supports the DeviceCheck
API.

### Getting a device token

[`generateToken(completionHandler:)`](/documentation/DeviceCheck/DCDevice/generateToken(completionHandler:))

Generates a token that identifies the current device.



---

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)