> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revyl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Flutter Builds

> Create iOS and Android builds for Flutter apps

Generate simulator builds for your Flutter app.

## Build Guidance

To use the [Dev Loop](../../develop/dev-loop-overview), a build is required **on every code change**. Dart compiles into the native binary — see [Dev Loop: Hot reload and rebuild configuration](../../develop/dev-loop-overview#hot-reload-and-rebuild-configuration) for the full breakdown.

## Build via the Revyl CLI

### Prerequisites

* Flutter SDK installed (`flutter doctor` passes)
* Xcode (for iOS) or Android SDK (for Android)
* Revyl CLI installed and authenticated (`revyl auth login`)

### Setup

Initialize the project using the Revyl CLI:

```bash theme={null}
revyl init
```

This detects Flutter and writes named profiles with the applicable iOS and/or
Android recipes. Review or fill in the app IDs, commands, and output paths before
the first build.

## Run Build

Run one profile/platform recipe in the cloud:

```bash theme={null}
revyl build --profile development --platform ios
```

Profiles live under `build.profiles`, may contain `ios` and/or `android`, and
are never stored as active/default. See [Configuration](/remote-builds/configuration).

This command automatically builds and uploads the app to Revyl, where you can use it to start sessions.

## Advanced Configuration

When you run `revyl init`, Revyl makes a best-effort guess at your configuration. This section covers configuration in more detail.

If the build does not complete successfully modify the build commands manually in the [config.yaml file](/cli/command-reference#config-yaml).

Note: For flutter apps, use **debug builds** for better test reliability.

Debug builds provide an accurate view hierarchy extraction, better element identification, and faster execution.

Here are example commands of how to build your flutter app as a debug configuration:

```bash theme={null}
# iOS debug build
flutter build ios --debug --simulator

# Android debug build
flutter build apk --debug
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="iOS build fails">
    Check Xcode configuration:

    ```bash theme={null}
    flutter doctor
    sudo xcode-select --switch /Applications/Xcode.app
    ```
  </Accordion>

  <Accordion title="Android build fails">
    Clean and rebuild:

    ```bash theme={null}
    flutter clean
    flutter pub get
    flutter build apk --debug
    ```
  </Accordion>

  <Accordion title="Can't find build file">
    Check build output directory:

    ```bash theme={null}
    # iOS
    open build/ios/iphonesimulator/

    # Android
    open build/app/outputs/flutter-apk/
    ```
  </Accordion>
</AccordionGroup>

## Resources

* [Flutter Build Modes](https://docs.flutter.dev/testing/build-modes)
* [Flutter Debugging](https://docs.flutter.dev/testing/debugging)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.