Verify device legitimacy and app integrity using DeviceCheck (DCDevice per-device bits) and App Attest (DCAppAttestService key generation, attestation, and assertion flows). Use when implementing fraud prevention, detecting compromised devices, validating app authenticity with Apple's servers, protecting sensitive API endpoints with attested requests, or adding device verification to a backend architecture.
The device-integrity skill provides comprehensive guidance for implementing Apple's DeviceCheck and App Attest frameworks to verify device legitimacy and app authenticity in iOS applications. It addresses the critical security challenge of ensuring that API requests originate from genuine Apple devices running unmodified versions of your app, protecting against fraud, jailbreak exploits, and unauthorized access to sensitive backend endpoints.
This skill covers two primary Apple frameworks: DCDevice for simple per-device flag management through ephemeral tokens, and DCAppAttestService for cryptographic verification using Secure Enclave-backed keys. The documentation includes complete implementation patterns for token generation, server communication, attestation flows, and assertion validation. It provides both client-side Swift code and server-side architectural guidance for integrating with Apple's verification endpoints.
Ideal for iOS developers building applications with fraud prevention requirements, payment systems, promotional offer redemption, or any scenario requiring strong device and app integrity guarantees. The skill includes error handling patterns, common implementation mistakes to avoid, server verification workflows, and security best practices for production deployments. It targets intermediate to advanced iOS developers who need to protect backend APIs from compromised devices or tampered applications.
DeviceCheck (DCDevice) provides simple per-device tokens and two persistent bits for basic device tracking like promotional offer redemption. App Attest (DCAppAttestService) provides cryptographic proof using Secure Enclave keys to validate that a specific app instance is legitimate and unmodified, offering stronger security for sensitive operations.
DCDevice is available on iOS 11 and later. DCAppAttestService requires iOS 14 or later. Always check isSupported before attempting to use either framework.
No. DeviceCheck tokens are ephemeral and single-use. You must generate a fresh token for each server operation rather than caching or reusing tokens.
Apple stores two Boolean values per device per developer team. You define their meaning based on your use case. Common examples include tracking if a device claimed a promotional offer (bit 0) or flagging a device for fraud (bit 1). These bits persist across app reinstalls.
Yes. Both DeviceCheck and App Attest require server-side verification. Your app generates tokens or attestations, sends them to your server, and your server communicates with Apple's verification endpoints using a DeviceCheck private key from the Apple Developer portal.
Quick Setup:
.claude/skills/Repository
dpearson2699/swift-ios-skills