Skip to main content

Generate a config file

This creates grantiva.yml in your project root. The CLI auto-detects your Xcode scheme and workspace.

Configuration reference

When using --app-file to provide a pre-built binary, scheme is not required. The bundle ID is derived from the binary’s Info.plist if not specified.

Screens

Each screen has a name and a path that describes how to navigate to it.

Simple launch screenshot

A screenshot is automatically taken at the end of each screen’s path.

Flows

The flows: key lists paths to existing Maestro YAML files that grantiva run executes as standalone functional tests, in addition to any screens: entries.
How it differs from screens: Paths are resolved relative to the directory containing grantiva.yml. Any screenshots taken inside a flow file are saved to .grantiva/captures/ named <flowname>-<screenshot>.png. grantiva run runs all screens: first, then each flow in flows: order. A runner failure in any flow captures a simctl screenshot of the current simulator state for debugging.
flows: is only used by grantiva run. The grantiva ci run pipeline (VRT) only processes screens:.

Maestro compatibility

Grantiva can read Maestro flow files as a drop-in replacement. If you have existing Maestro flows, there’s no need to rewrite them.

Auto-detection

Grantiva auto-detects the format when loading configuration:
  1. Looks for grantiva.yml — parses as Grantiva or Maestro format (auto-detected)
  2. If no grantiva.yml, looks for a .maestro/ directory and loads all flow files

Using Maestro flows

Write grantiva.yml in Maestro format, or place flows in .maestro/:
Each takeScreenshot becomes a named screen capture point. Commands between screenshots become navigation steps.

Supported Maestro commands

Unsupported commands (pressKey, setPermissions, evalScript, repeat, etc.) are silently skipped.

Sub-flows

Maestro sub-flows referenced via runFlow are also parsed in Maestro format when auto-detected. You can mix Grantiva and Maestro flow files.

Diff thresholds

A screen fails if either threshold is exceeded.

Build settings

Pass extra flags directly to xcodebuild:
Each entry is appended verbatim to the xcodebuild invocation.

Accessibility checks

Size limits

Warn or fail when a screenshot exceeds a file size threshold:

AI provider

Reserved for future AI-powered visual assertion features.

Directory structure

After running commands, Grantiva creates:
Credentials are stored at ~/.grantiva/auth.json.