---
title: DCAppAttestService
framework: DeviceCheck
role: symbol
role_heading: Class
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 15.0+, visionOS 1.0+, watchOS 9.0+]
path: devicecheck/dcappattestservice
---

# DCAppAttestService

A service that you use to validate the instance of your app running on a device.

## Declaration

```swift
class DCAppAttestService
```

## Mentioned in

Establishing your app’s integrity Validating apps that connect to your server

## Overview

Overview Use the shared instance of the DCAppAttestService class to assert the legitimacy of a particular instance of your app to your server. After ensuring service availability by reading the isSupported property, you use the service to: Create a cryptographic key in the Secure Enclave by calling the generateKey(completionHandler:) method. Ask Apple to certify the key by calling the attestKey(_:clientDataHash:completionHandler:) method. - Prepare an assertion of your app’s integrity to accompany any or all server requests using the generateAssertion(_:clientDataHash:completionHandler:) method. For more information about how to support App Attest in your app, see Establishing your app’s integrity. For information about the complementary procedures you implement on your server, see Validating apps that connect to your server. note: To use the App Attest service, your app must have an app ID that you register on the Apple Developer website.

## Topics

### Accessing the service

- [shared](devicecheck/dcappattestservice/shared.md)
- [isSupported](devicecheck/dcappattestservice/issupported.md)

### Preparing a key

- [generateKey(completionHandler:)](devicecheck/dcappattestservice/generatekey(completionhandler:).md)
- [attestKey(_:clientDataHash:completionHandler:)](devicecheck/dcappattestservice/attestkey(_:clientdatahash:completionhandler:).md)

### Validating the app instance

- [generateAssertion(_:clientDataHash:completionHandler:)](devicecheck/dcappattestservice/generateassertion(_:clientdatahash:completionhandler:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### App Attest

- [Establishing your app’s integrity](devicecheck/establishing-your-app-s-integrity.md)
- [Validating apps that connect to your server](devicecheck/validating-apps-that-connect-to-your-server.md)
- [Assessing fraud risk](devicecheck/assessing-fraud-risk.md)
- [Preparing to use the app attest service](devicecheck/preparing-to-use-the-app-attest-service.md)
- [Attestation Object Validation Guide](devicecheck/attestation-object-validation-guide.md)
- [App Attest Environment](bundleresources/entitlements/com.apple.developer.devicecheck.appattest-environment.md)
