Skip to main content
This guide covers how to run Rainbow in development mode on iOS and Android.

Prerequisites

Before running the app, ensure you’ve completed:

Development Workflow

The typical development workflow involves two steps:
  1. Start Metro Bundler - JavaScript bundler (like webpack for React Native)
  2. Run on Platform - Build and launch on iOS/Android

Start Metro Bundler

In one terminal, start the Metro bundler:
yarn start
Metro will start and display:
               ######                ######               
             ###     ####        ####     ###             
            ##          ###    ###          ##            
            ##             ####             ##            
            ##             ####             ##            
            ##           ##    ##           ##            
            ##         ###      ###         ##            
             ##  ####                ####  ##             
          ######                        ######            
      ###     ##       ###      ###       ##     ###      
   ###         ## ######## #### ######## ##         ###   
  ##           ####                    ####           ##  
 ##             ###                    ###             ## 
  ##           ####                    ####           ##  
   ###         ## ######## #### ######## ##         ###   
      ###     ##       ###      ###       ##     ###      
          ######                        ######            
             ##  ####                ####  ##             
            ##         ###      ###         ##            
            ##           ##    ##           ##            
            ##             ####             ##            
            ##             ####             ##            
            ##          ###    ###          ##            
             ###     ####        ####     ###             
               ######                ######               

Welcome to Metro!
Keep Metro running in this terminal while developing. It watches for file changes and provides hot reload.

Running on iOS

Running on Android

Development Features

Hot Reload

When Metro is running, changes to JavaScript/TypeScript files automatically reload:
  • Fast Refresh: Preserves component state while reloading
  • Automatic: Saves the file, app updates
Fast Refresh works for most React components. Some changes (like adding new native modules) require a full rebuild.

Developer Menu

Access the developer menu:
  • iOS Simulator: Press Cmd+D
  • Android Emulator: Press Cmd+M (macOS) or Ctrl+M (Windows/Linux)
  • Physical Device: Shake the device
Options include:
  • Reload
  • Debug
  • Enable/disable Fast Refresh
  • Toggle Element Inspector
  • Show Performance Monitor

Remote Debugging

React DevTools

Install standalone React DevTools:
npm install -g react-devtools
react-devtools
Then open the developer menu and enable Debug.

Chrome DevTools (Legacy)

In developer menu, select Debug to open Chrome DevTools.
Chrome DevTools debugging is deprecated in newer React Native versions. Use React DevTools or Flipper instead.

Flipper

Flipper is a debugging platform for mobile apps:
  1. Download Flipper: https://fbflipper.com/
  2. Build app with Flipper enabled (default)
  3. Open Flipper while app is running
Features:
  • Network inspector
  • React DevTools
  • Logs viewer
  • Layout inspector

Element Inspector

Inspect UI elements:
  1. Open developer menu
  2. Select Toggle Element Inspector
  3. Tap elements to see details (styles, props, etc.)

Environment-Specific Builds

Development Mode

Default mode when running yarn ios or yarn android:
  • Hot reload enabled
  • Developer menu accessible
  • No optimizations
  • Larger bundle size

Release Mode

Run in release mode for performance testing:
yarn ios --mode Release
Release mode:
  • ✅ Full optimizations
  • ✅ Smaller bundle size
  • ✅ Production-like performance
  • ❌ No hot reload
  • ❌ No developer menu
Use release mode when testing performance or E2E tests. Set IS_TESTING=true in .env for E2E tests.

Multiple Devices

Run on All Android Devices

Run on all connected Android devices:
# Reverse ports on all devices
yarn android-reverse-ports-all

# Install APK on all devices
yarn android-all:apk

Switch Between Devices

iOS: Select different simulator in Xcode or use --simulator flag. Android: If multiple devices are connected, specify device:
# List devices
adb devices

# Run on specific device
adb -s <device_id> install app.apk

Troubleshooting

Clear watchman and Metro cache:
yarn clean:packager
yarn start --reset-cache
Node is not in Xcode’s PATH:
  1. Close Xcode
  2. Run nvm use in terminal
  3. Open Xcode from terminal: open ios/Rainbow.xcworkspace
Android Studio doesn’t have node in PATH:
  1. Close Android Studio
  2. Launch from terminal: open -a "Android Studio"
  3. Reopen the android/ folder
Check Metro bundler is running:
yarn start
View logs:
  • iOS: Xcode console or react-native log-ios
  • Android: Android Studio logcat or react-native log-android
iOS: Ensure Metro is running and simulator can reach localhost.Android: Reverse ports:
yarn android-reverse-ports
  1. Check Metro is running
  2. Open developer menu
  3. Ensure Fast Refresh is enabled
  4. Try manual reload: Cmd+R (iOS) or R+R (Android)
If issues persist, clean everything:
# Full clean
./scripts/nuke.sh

# Reinstall
yarn install && yarn setup
yarn install-pods  # iOS only

# Rebuild
yarn ios  # or yarn android

Performance Tips

  • Use release mode for accurate performance testing
  • Disable Remote JS Debugging (it slows down the app significantly)
  • Use Flipper or React DevTools instead of Chrome DevTools
  • Profile with React DevTools Profiler
  • Monitor performance with yarn shopify:perf if using Shopify performance tools

Next Steps

Building

Create production builds and release packages

Debugging

Debug issues and run E2E tests

Build docs developers (and LLMs) love