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
A flag can hold a different value per environment. The SDK evaluates againstproduction; set the other environments’ values in the dashboard for your staging and development builds.