What is device attestation?
Device attestation verifies that an API request is coming from a real, unmodified Apple device running your legitimate app. It uses Apple’s App Attest framework to cryptographically prove device integrity.Why it matters
Without device attestation, anyone can:- Reverse-engineer your API and call it from scripts
- Use jailbroken devices to bypass in-app restrictions
- Run your app in emulators or modified environments
- Replay or forge API requests
How it works
- Your app requests a one-time challenge from Grantiva
- Grantiva returns a cryptographic challenge — single-use, and valid for 5 minutes by default
- The SDK calls Apple’s App Attest to create an attestation
- Apple returns a signed attestation object
- The SDK sends it to Grantiva for validation
- Grantiva validates the attestation against Apple’s certificate chain
- A signed JWT is returned with device intelligence and risk score
No API keys on-device
Your app is identified by its Bundle ID and Team ID — both are sent automatically by the SDK. No API keys are stored in the app binary, so there’s nothing to extract or steal. Server-to-server API keys (created under API Keys in the dashboard) are for backend operations only.What the JWT contains
On paid plans the attestation JWT is signed device intelligence, not just a proof of attestation:- Device integrity status (
device_integrity) - Risk score, 0–100 (
risk_score) - Jailbreak detection (
jailbreak_detected) - Attestation history (
first_seen,attestation_count,last_attestation) - Your custom claims if configured
Simulator development
App Attest is not available in the iOS simulator. For development, initialize the SDK with an API key:deviceIntegrity: "api_key_mode". These requests are unattested — they carry lower trust and no risk scoring. Never ship an API key in a production build. See Simulator setup and Testing.