1. Install the CLI
2. Authenticate
~/.grantiva/auth.json. For CI, use an API key instead:
GRANTIVA_API_KEY in the environment, which takes precedence over the saved file.
3. Initialize your project
grantiva.yml. The scheme is read from the name of the .xcworkspace or .xcodeproj in the directory, and the simulator defaults to iPhone 16 — edit either if that is wrong.
4. Define your screens
Editgrantiva.yml to list the screens you want to test:
5. Capture baselines
Take initial screenshots:6. Run comparisons
After making changes, compare against baselines:7. Add to CI
grantiva ci run exits 0 when every screen passes and 1 when any fails — the results are uploaded either way.
Review the run from the terminal without leaving CI:
How diffing works
Each screen is compared using two metrics:
A screen fails if either threshold is exceeded. Adjust in
grantiva.yml:
Next steps
- VRT concepts — how the CLI driver works, the baseline lifecycle, and CI vs local auth
- Commands — every
grantivacommand and flag - Configuration — the full
grantiva.ymlreference - CI integration — GitHub Actions, pre-built binaries, and parallel runs
- VRT review — accept, flag, and approve runs from the terminal