Choose your setup
Physical device
Recommended. Full attestation, risk scoring, and JWT. Requires an iPhone or iPad running iOS 18+. Continue reading below.
Simulator / CI
No device handy? Start here. API key fallback — build and test everything today, switch to hardware attestation when ready.
Prerequisites
- Xcode 16+ with Swift 6.0+
- A physical iOS 18+ device
- Your Apple Team ID (found in the Apple Developer portal under Membership)
- Your app’s Bundle ID
1. Create an account
Sign up at grantiva.io/get-started with email, GitHub, or Google. Then add your first app from the dashboard — you’ll need your Apple Team ID and Bundle ID.2. Add the SDK
Add the Grantiva Swift package to your Xcode project:Package.swift:
Grantiva to your target dependencies.
Requires iOS 18+ / macOS 15+ and Swift 6.0+. The SDK has zero external dependencies.
3. Initialize Grantiva
Bundle.main.
4. Attest the device
5. Verify on your backend
Include the token in API requests from your app:Next steps
Test your integration
Verify attestation is working correctly — checklist, sample responses, and common errors.
Attestation deep dive
Token caching, refresh, and the full attestation flow.
Risk scoring
Understanding risk scores and how to set thresholds.
Feature flags
Toggle features remotely from the dashboard.
In-app feedback
Add feature requests and support tickets to your app.