Platform

Device Attestation, Feature Flags & More

Everything you add to your iOS app after the core features are built -- attestation, intelligence, flags, testing, feedback, and analytics -- all from a single Swift package.

Device Attestation

Hardware-backed device verification

Grantiva uses Apple's App Attest API to cryptographically verify every device. No API keys, no shared secrets -- just the hardware-backed attestation Apple built into every iPhone.

Zero-config authentication

Bundle ID and Team ID identify your app automatically. No API keys to rotate, no secrets to leak.

Challenge-response protocol

Server-generated challenges prevent replay attacks. Full attestation completes in under 500ms.

JWT token issuance

Successful attestation returns a signed JWT with device intelligence, risk score, claims, and flag evaluations.

Automatic re-attestation

The SDK handles token lifecycle, re-attesting transparently when tokens expire or conditions change.

Attestation Flow
// The complete attestation flow

let grantiva = Grantiva(
  teamId: "A1B2C3D4E5"
)

// SDK handles:
//   1. Request challenge from server
//   2. Generate attestation key
//   3. Create attestation object
//   4. Submit for validation
//   5. Receive signed JWT

let token = try await grantiva.attest()

// token is a verified, signed JWT
print(token.isValid)      // true
print(token.riskScore)    // 12
print(token.device.model) // "iPhone 16 Pro"
Risk Intelligence

Know every device's risk level

Every attestation includes a 0-100 risk score computed from hardware signals, behavioral patterns, and threat intelligence. Make trust decisions in real-time.

Continuous risk scoring

0-20 low (trusted), 21-50 medium (verify), 51-75 high (restrict), 76-100 critical (block).

Threat detection

Jailbreak detection, app tampering, certificate manipulation, and replay attack prevention.

Geographic intelligence

Flag anomalies like impossible travel, VPN usage, or access from unexpected regions.

Risk-based webhooks

Get notified when devices cross risk thresholds. Trigger automated responses via webhook.

Risk AssessmentLive
iPhone 16 Pro8
iPhone 1423
iPhone 12 (flagged)72
Detection Signals
Jailbreak
App Integrity
Replay Attack
Geo Anomaly
Feature Flags

Ship features with device-aware targeting

Roll out features to specific device risk levels, OS versions, or a percentage of your fleet. Update flags in real-time without deploying code. Multiple value types and per-environment configuration.

Device-aware targeting

Target by risk score, device model, OS version, app version, or custom device attributes.

Percentage rollouts

Gradually roll out to 1%, 10%, 50% of devices. Monitor impact before going to 100%.

Real-time updates via SSE

Flags update instantly on-device via Server-Sent Events. No polling, no delays.

Multi-environment support

Separate flag configurations for development, staging, and production environments.

Feature Flags
productionstagingdev
new_checkoutbool

All devices, risk < 50

100%
beta_searchbool

iOS 19+, 25% rollout

25%
onboarding_v2json

New users, A/B test

50%
premium_onboardingstring

Scheduled: Mar 15

Custom JWT Claims

Enrich JWT tokens with your data

Add custom claims to attestation tokens. Static values, conditional logic based on device attributes, dynamic expressions, or data from external APIs. Up to 30 claims per tenant.

Static claims

Fixed key-value pairs added to every token. Perfect for app configuration or tier assignment.

Conditional claims

Claims that evaluate based on device attributes. Different values for different risk levels.

Dynamic claims

Computed using expressions at attestation time. Combine device signals into custom logic.

External claims (Enterprise)

Fetch claim values from your own APIs at attestation time. Real-time data enrichment.

JWT Payload
{
  "deviceId": "d8f4...a2e1",
  "riskScore": 12,
  "claims": {
    // Static
    "app_tier": "premium",

    // Conditional (risk-based)
    "access_level": "full",

    // Dynamic (expression)
    "trust_tier": "gold",

    // External (your API)
    "subscription": "active"
  },
  "flags": {
    "new_checkout": true,
    "beta_search": false
  }
}
Visual Regression Testing

Catch visual bugs before your users do

Capture screenshots of your UI, compare against baselines, and get notified when something changes. Integrates with GitHub PRs so visual diffs appear right in your code review workflow.

Snapshot capture

Capture screenshots from Xcode UI tests automatically. Runs in CI or locally during test runs.

Pixel-level diffing

Compare screenshots against approved baselines. Configurable thresholds for acceptable variance.

GitHub PR integration

Visual diffs appear as PR comments with before/after overlays. Approve new baselines from the dashboard.

Baseline management

Organize baselines by screen, device, and OS version. Bulk approve or reject from the dashboard.

checkout_screen.png1.2% diff
Baseline
Current
grantiva-botcommented on PR #142
Visual regression detected in checkout_screen: 1.2% pixel diff (threshold: 1%). View diff | Approve baseline
In-App Feature Voting

Let users shape your roadmap

Users vote on features and submit ideas from inside your app. The GrantivaUI Swift package includes drop-in SwiftUI components -- no custom UI needed. View results and prioritize from your dashboard.

Drop-in SwiftUI views

FeedbackListView, SupportTicketView, and more. Themed to match your app automatically.

Upvoting and commenting

Users vote on existing requests or submit new ones. See what your users actually want.

Dashboard prioritization

Sort by votes, filter by segment, and export to your issue tracker. Real product signal.

Device context included

Every submission includes device model, OS version, and app version for better triage.

Feature RequestsGrantivaUI
47
Dark mode support
Planned
31
Export to PDF
Reviewing
28
Offline mode
Open
19
Widget support
Open
Submit Feature Request
In-App Support Tickets

Support without leaving the app

Users submit support tickets from inside your app with threaded conversations. The SDK includes SwiftUI views for ticket creation and history. Manage everything from your Grantiva dashboard.

Ticket creation from the app

SupportTicketView provides a ready-made form. Users describe their issue without leaving your app.

Threaded conversations

Back-and-forth messaging between your team and users. Rich text, device context attached automatically.

Device context auto-attached

Every ticket includes device model, OS version, app version, and risk score for faster diagnosis.

Dashboard management

Assign, prioritize, and resolve tickets from your Grantiva dashboard. Filter by app, status, or priority.

Support Ticket #1042In Progress
U
User -- 2h ago
Checkout crashes on iPhone 14 when I tap "Pay". Happens every time.
G
Support -- 1h ago
Thanks for reporting. I can see from the device context you're on iOS 18.2 -- we've identified the issue and a fix is rolling out now.
Auto-attached context
Device:iPhone 14OS:iOS 18.2App:v2.4.1Risk:23 (medium)
Webhooks & Event Routing

React to device events in real-time

Configure webhook endpoints to receive notifications when key events occur -- high-risk devices, fraud attempts, attestation anomalies, or custom threshold alerts. Set up retry policies and dead-letter queues for reliability.

Event-driven alerts

Get notified when devices cross risk thresholds, attestation patterns change, or fraud signals are detected.

Custom threshold notifications

Define your own alert rules. Trigger webhooks when risk scores exceed a value or attestation volume spikes.

Reliable delivery

Automatic retries with exponential backoff. Dead-letter queues on Enterprise so you never miss an event.

Dashboard configuration

Add, test, and monitor webhook endpoints from your dashboard. See delivery logs and response times.

Webhook Endpoints3 active
api.myapp.com/webhooks/risk

high_risk, fraud_blocked

api.myapp.com/webhooks/attest

attestation_failed

slack.com/services/T0X...

threshold_alert

Recent Deliveries
high_risk_device
20042ms
threshold_alert
20089ms
attestation_anomaly
20056ms
Analytics & Live Monitoring

Real-time visibility into your fleet

Track attestation volume, risk distribution, flag evaluations, and device intelligence in real-time. See which devices are active now and investigate anomalies from your dashboard.

Live device tracking

See active devices in real-time with heartbeat monitoring. Know your MAD count instantly.

Attestation trends

Volume over time, success rates, failure reasons. Spot integration issues before they impact users.

Risk distribution

Understand your fleet at a glance. How many devices are low risk vs high risk, trending over time.

Flag evaluation metrics

See how flags are evaluating across your device fleet. Track adoption of new features.

Active Devices
2,847
+12% this week
Attestations (24h)
14,392
99.7% success
Avg Risk Score
18
Low risk fleet
Flags Evaluated
42,108
12 active flags
Attestations (7d)Live

Start building with Grantiva

One Swift package. Nine capabilities. Free tier includes everything you need to evaluate.