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

Build simulator/emulator apps from 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.

## iOS Simulator Build

### Generate Bundle

```bash theme={null}
cd /path/to/your/react-native-project

# For dev-loop change dev to `true`
npx react-native bundle \
  --entry-file='index.js' \
  --bundle-output='./ios/main.jsbundle' \
  --dev=false \
  --platform='ios'
```

### Build in Xcode

```bash theme={null}
# Open workspace
open ios/YourApp.xcworkspace
```

In Xcode:

1. Select any **iOS Simulator** as destination
2. **Product → Build** (⌘+B)
3. Find build: `ios/build/Build/Products/Debug-iphonesimulator/YourApp.app`

### Test

1. Open iOS Simulator
2. Drag `.app` file onto simulator
3. Launch and verify

## Android Emulator Build

### Create Assets Directory

```bash theme={null}
mkdir -p android/app/src/main/assets
```

### Generate Bundle

```bash theme={null}
# For dev-loop change dev to `true`
npx react-native bundle \
  --platform android \
  --dev false \
  --entry-file index.js \
  --bundle-output android/app/src/main/assets/index.android.bundle \
  --assets-dest android/app/src/main/res
```

### Build APK

```bash theme={null}
cd android
./gradlew assembleDebug
```

APK location: `android/app/build/outputs/apk/debug/app-debug.apk`

### Test

```bash theme={null}
# Start emulator, then:
adb install app/build/outputs/apk/debug/app-debug.apk
```

Launch from emulator and verify.

## Troubleshooting

### Bundle Generation Fails

```bash theme={null}
# Reset cache
npx react-native start --reset-cache

# Clean install
rm -rf node_modules && npm install
```

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

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

## Next Steps

Upload to Revyl:

* **iOS**: Upload `.app` from `ios/build/Build/Products/Debug-iphonesimulator/`
* **Android**: Upload `.apk` from `android/app/build/outputs/apk/debug/`

See [Builds page](/builds/index) for upload instructions.

## Authenticated Test States

To start tests from a signed-in screen, add a test-only auth-bypass deep link handler with React Native `Linking`, then expose Revyl launch variables from native iOS/Android into JavaScript.

See [Auth Bypass Deep Links](/builds/auth-bypass-deeplinks#framework-recipes) for the React Native CLI snippet.
