device-integrity

Verify iOS device and app integrity with Apple DeviceCheck and App Attest.

Updated May 10, 2026
One-click install
npx skills add https://github.com/FelixRauch/medat-figuren --skill device-integrity-felixrauch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: device-integrity
Source: https://github.com/FelixRauch/medat-figuren/tree/main/.agents/skills/device-integrity
Command: npx skills add https://github.com/FelixRauch/medat-figuren --skill device-integrity-felixrauch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps prevent fraud by verifying that your requests originate from an authentic Apple device running your unmodified app, rather than a tampered or spoofed client.

Core Features & Use Cases

  • DeviceCheck per-device integrity signals (DCDevice): Generate ephemeral device tokens and use them to query/update two persistent boolean “bits” on the server for flags or risk controls.
  • App Attest attestation and request signing (DCAppAttestService): Create a Secure Enclave–backed key, perform one-time attestation with a server-issued challenge, then generate per-request assertions for ongoing verification.
  • Server verification guidance and hardening: Use attestation verification, assertion counter checks (replay protection), and endpoint design patterns to ensure signatures and challenges match.

Quick Start

Have the client generate a DeviceCheck token and/or an App Attest key, send the token/attestation to your backend, and verify assertions for sensitive endpoints using server-stored public keys and counters.

Frequently Asked Questions about device-integrity

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify iOS app integrity and prevent fraud on my backend?

App Attest verifies device integrity by having a client generate a Secure Enclave-backed key, attest it with a server challenge, and sign subsequent requests. The server validates these assertions using stored public keys and replay counters.

What is the difference between DeviceCheck and App Attest for server verification?

DeviceCheck provides per-device integrity tokens and persistent boolean bits for risk controls, while App Attest handles Secure Enclave key attestation and per-request assertion signing. Both contribute to server-side authenticity checks in iOS client-server architectures.

How do I implement App Attest key lifecycle and assertion validation?

Implement App Attest by generating a key, performing one-time attestation with a server challenge, and creating per-request assertions. Your server validates assertions by checking signatures, matching challenge hashes, and enforcing replay counter increments.

Does device integrity verification work for protecting sensitive API endpoints?

Yes, device integrity verification protects sensitive API endpoints by requiring App Attest assertions for ongoing requests. Server-side validation ensures signatures and challenges match, blocking tampered clients from accessing protected backend resources.

How does anti-replay protection work with App Attest assertions?

Anti-replay protection works by enforcing server-side assertion counter checks. Each valid App Attest assertion increments a counter, and the server rejects requests with duplicate or outdated counter values to prevent replayed signature attacks.