# Demo mode for apps with a login

> Get past sign-in screens and show realistic data with launch arguments, environment variables and seed data.

Source: https://showtake.app/docs/demo-mode

ShowTake never asks for real accounts and the agent never guesses credentials. When a login wall, paywall or empty state blocks the feature you want to film, give the app a **demo mode**.

## Launch arguments and environment

`prepare_ios` and `prepare_macos` take `launch_args` and `env`; both are saved in the flow, so replays start the same way.

```json
{ "scheme": "Notes", "launch_args": ["-demoMode", "YES"], "env": { "DEMO_USER": "alex" } }
```

In the app, read them once at launch:

```swift
let isDemo = ProcessInfo.processInfo.arguments.contains("-demoMode")
    || UserDefaults.standard.bool(forKey: "demoMode")
if isDemo {
    session = .signedIn(DemoData.user)   // skip the login screen
    store.load(DemoData.notes)           // realistic content
}
```

Keep demo mode out of release builds you ship (`#if DEBUG`, or a build setting): ShowTake builds the Release configuration by default, so pass `"configuration": "Debug"` or a dedicated `Demo` configuration if your demo code is behind `DEBUG`.

## Test accounts

If the app must sign in for real, use a test account and pass its credentials through `env` from your own shell environment, never in the prompt. When the agent types a password it sets `mask: true`, so the text is hidden in the render and in the logs.

## Seed data and environment (iOS)

`prepare_ios` can also:

- add images and videos to Photos (`photos`),
- set a location (`location: [latitude, longitude]`),
- pre-grant permissions so no alert interrupts the take (`privacy: ["photos", "camera", "location"]`),
- set the appearance (`light` or `dark`), the locale (`de_DE`) and the status bar time (default 9:41).

## Elements without labels

If buttons have no accessibility label or identifier, the agent can only tap by coordinates, which breaks easily on replays. Adding `.accessibilityIdentifier("todos.add")` to the controls in the demo makes takes and flows far more reliable, and helps VoiceOver users too.
