> ## 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.

# React Native Builds

> Create iOS and Android builds for React Native CLI projects

For the local dev loop, generate a dev build using the Debug configuration. For automated testing or CI, use a release-like build once you're ready.

## Build Guidance

To use the [Dev Loop](../../develop/dev-loop-overview), a build is required **only on native code changes** (new native modules, Podfile/Gradle changes, build configuration). JS/TS changes hot reload via Metro — see [Dev Loop: Hot reload and rebuild configuration](../../develop/dev-loop-overview#hot-reload-and-rebuild-configuration) for the full breakdown.

## Build via Revyl CLI

### Prerequisites

* Node.js 18+
* Expo CLI (`npx expo`)
* EAS CLI (`npx eas-cli`) for local or cloud builds
* Revyl CLI installed and authenticated (`revyl auth login`)

### Setup

Initialize the project using the Revyl CLI:

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

This creates iOS and Android Development and Preview apps, generates the necessary Revyl configuration files, runs a build, and uploads it to Revyl. See [Types of Builds](/builds#types-of-builds) for more information.

Development builds power the dev loop. Preview builds are for testing and starting sessions when the Metro server isn't needed.

### Run Build

Run a build using:
`revyl build --platform [ios|android|<config-key>]`

Platform config keys are automatically generated and defined in the `.revyl/config.yaml` file. See the [Configuration](/cli/command-reference#section-reference) page for more details.

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

## Advanced Configuration

Revyl makes a best effort to determine the build commands to be used. If the build does not complete successfully modify the build commands manually in the [config.yaml file](/cli/command-reference#config-yaml).

## Troubleshooting

<AccordionGroup>
  <Accordion title="Bundle generation fails">
    ```bash theme={null}
    # Reset cache
    npx react-native start --reset-cache

    # Clean install
    rm -rf node_modules && npm install
    ```
  </Accordion>

  <Accordion title="iOS build issues">
    Signing errors for simulator builds:

    * Set **Code Signing Identity** to "Don't Code Sign"
    * Or enable **Automatically manage signing**

    Missing dependencies:

    ```bash theme={null}
    cd ios
    xcodebuild clean
    cd ..
    npx react-native run-ios
    ```
  </Accordion>

  <Accordion title="Android build issues">
    Gradle fails:

    ```bash theme={null}
    cd android
    ./gradlew clean
    rm -rf ~/.gradle/caches
    ```

    Assets missing:

    ```bash theme={null}
    # Verify bundle exists
    ls -la android/app/src/main/assets/
    # Should show index.android.bundle
    ```
  </Accordion>
</AccordionGroup>
