Skip to main content

Prerequisites

  • Grantiva SDK installed (Installation)
  • Device attestation working (Quick Start) — flag endpoints authenticate with the attestation JWT, so call validateAttestation() before reading flags (in the Simulator, use API key mode instead)
  • At least one flag created in the dashboard

1. Create a flag in the dashboard

Go to Feature Flags in the dashboard sidebar and create a flag:
  • Key: dark_mode
  • Type: Boolean
  • Value: true (production), false (staging)

2. Read flags in your app

3. All flag types

4. Environments

Flags can have different values per environment:

5. Cache control

Flags are cached for 5 minutes by default:

SwiftUI example

Tier limits

Next steps