Skip to main content

1. Install the CLI

Verify your environment:
Then extract the embedded UI automation runner:

2. Authenticate

This opens your browser for login, and saves the credentials to ~/.grantiva/auth.json. For CI, use an API key instead:
Or set GRANTIVA_API_KEY in the environment, which takes precedence over the saved file.

3. Initialize your project

This creates 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

Edit grantiva.yml to list the screens you want to test:

5. Capture baselines

Take initial screenshots:
Approve them as baselines:

6. Run comparisons

After making changes, compare against baselines:
Or run the full pipeline (build + capture + compare + upload):

7. Add to CI

Results are posted as a GitHub Check Run on your pull request when the GitHub App is configured. 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 grantiva command and flag
  • Configuration — the full grantiva.yml reference
  • CI integration — GitHub Actions, pre-built binaries, and parallel runs
  • VRT review — accept, flag, and approve runs from the terminal