run
Build and run your app on iOS or Android devices and simulators.
The run command builds your app and launches it on a device or simulator.
Usage
teardown run <platform> [options]Arguments
| Argument | Description |
|---|---|
platform | ios or android (required) |
Options
| Option | Description | Default |
|---|---|---|
-d, --device <device> | Specific device name or ID | - |
--no-picker | Skip device picker, use first available | false |
--release | Run in release mode | false |
--port <port> | Metro bundler port | 8081 |
--no-bundler | Skip starting Metro bundler | false |
--configuration <config> | iOS build configuration | Debug |
--scheme <scheme> | iOS Xcode scheme to build | - |
--variant <variant> | Android build variant | debug |
--clean | Clean build before running | false |
Examples
Run on iOS Simulator
teardown run iosShows a device picker if multiple simulators are available.
Run on Android Emulator
teardown run androidRun on Specific Device
# By name
teardown run ios --device "iPhone 15 Pro"
# By UDID
teardown run ios --device "ABCD1234-5678-90EF-GHIJ-KLMNOPQRSTUV"Skip Device Picker
# Use first available device
teardown run ios --no-pickerRelease Build
teardown run ios --releaseCustom Metro Port
teardown run ios --port 8082Without Metro Bundler
# Useful when Metro is already running
teardown run ios --no-bundlerClean Build
teardown run ios --cleanWhat Happens
The run command:
- Checks for native project - Auto-runs
prebuildif needed - Installs CocoaPods (iOS) - If pods aren't installed
- Starts Metro bundler - In background (unless
--no-bundleror--release) - Detects devices - Lists available devices/simulators
- Shows device picker - Unless
--deviceor--no-picker - Boots simulator (if needed) - For iOS simulators
- Builds the app - Using Xcode or Gradle
- Installs the app - On selected device
- Launches the app - Via deep link with bundler URL
- Attaches Metro - Brings bundler to foreground
Device Picker
When multiple devices are available, an interactive picker appears:
? Select a device
❯ iPhone 15 Pro (Booted)
iPhone 15 (Shutdown)
iPhone SE (3rd generation) (Shutdown)
iPad Pro (Shutdown)Use arrow keys to navigate, Enter to select.
iOS-Specific Options
Scheme
Use a specific Xcode scheme:
teardown run ios --scheme MyApp-DevelopmentConfiguration
Specify build configuration:
teardown run ios --configuration ReleaseAndroid-Specific Options
Variant
Specify build variant:
teardown run android --variant release
teardown run android --variant stagingDebugAuto-Prebuild
If native projects don't exist, run automatically triggers prebuild:
# This works even without ios/ folder
teardown run ios
# → Runs prebuild first, then builds and runsCocoaPods Installation
For iOS, if Pods aren't installed, the CLI handles it:
Installing CocoaPods dependencies... (45s) - installing React-CoreProgress is shown with current activity and elapsed time.
Troubleshooting
No Devices Found
No iOS simulators found- Open Xcode and install simulators: Xcode → Settings → Platforms
- For physical devices, connect via USB and trust the computer
Build Failed
Check the error output. Common fixes:
# Clean and rebuild
teardown run ios --clean
# Or rebuild from scratch
teardown prebuild --clean
teardown run iosMetro Already Running
Port 8081 is already in useEither:
- Stop the existing Metro process
- Use a different port:
teardown run ios --port 8082 - Skip bundler:
teardown run ios --no-bundler
CocoaPods Failed
If pod install fails:
cd ios
pod install --repo-updateOr delete and reinstall:
rm -rf ios/Pods ios/Podfile.lock
cd ios && pod installApp Won't Launch
If the app builds but doesn't launch:
# Try with verbose logging
teardown run ios --verboseCheck that your app scheme matches your URL scheme in teardown.config.ts.