
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-device-runner
Advanced tools
π Auto device detection & React Native/Expo app runner script
Automatically detects connected physical devices and runs your React Native or Expo app with a single command. Works seamlessly with both Expo and React Native CLI projects.
adb command availablejq (optional, for advanced JSON parsing)# Auto-detect (iOS preferred)
npx react-native-device-runner
# Prefer Android
npx react-native-device-runner --prefer android
# Prefer iOS
npx react-native-device-runner --prefer ios
# Help
npx react-native-device-runner --help
# Version
npx react-native-device-runner --version
npm install -g react-native-device-runner
# Usage after install
rn-device
# or
rndr
# or
react-native-device-runner
You can configure build options using one of the following methods:
Note: The tool automatically uses
Debugfor iOS configuration anddebugfor Android variant - these values are hardcoded and don't need to be configured.
app.json extra section (Expo projects){
"expo": {
"extra": {
"IOS_SCHEME": "myapp",
"IOS_BUNDLE_ID": "com.mycompany.myapp",
"AOS_APP_ID": "com.mycompany.myapp"
}
}
}
.env fileIOS_SCHEME=myapp
IOS_BUNDLE_ID=com.mycompany.myapp
AOS_APP_ID=com.mycompany.myapp
export IOS_SCHEME="myapp"
export IOS_BUNDLE_ID="com.mycompany.myapp"
npx react-native-device-runner
If automatic detection fails or you need to override:
# Force Expo mode
export FORCE_PROJECT_TYPE="expo"
npx react-native-device-runner
# Force React Native CLI mode
export FORCE_PROJECT_TYPE="react-native-cli"
npx react-native-device-runner
$ npx react-native-device-runner
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π React Native Device Runner β
β Auto Device Detection & Runner Script β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
## π Configuration Variables
| Variable | Description | Default | Example |
| ------------------- | ----------------------- | ------------ | ----------------------- |
| `IOS_SCHEME` | iOS build scheme | - | `myapp` |
| `IOS_BUNDLE_ID` | iOS bundle ID | - | `com.mycompany.myapp` |
| `IOS_WORKSPACE` | iOS workspace path | - | `ios/MyApp.xcworkspace` |
| `IOS_DERIVED_DATA` | iOS build data path | `.build/ios` | `.build/ios` |
| `AOS_APP_ID` | Android app ID | - | `com.mycompany.myapp` |
| `AOS_MODULE` | Android module name | `app` | `app` |
> **Note:** The tool automatically uses `Debug` for iOS configuration and `debug` for Android variant. These values are hardcoded and don't need to be configured.
## Project Type Detection
React Native Device Runner automatically detects whether your project is using Expo or React Native CLI based on several factors:
1. **Package Dependencies**: Checks if `expo` is listed in your package.json dependencies
2. **Configuration Files**: Looks for Expo-specific files like app.json with an expo section
3. **Directory Structure**: Checks for the presence of ios/ and android/ folders
4. **Command Availability**: Verifies that the necessary CLI tools are installed
The tool will optimize the build and run commands based on the detected project type. If automatic detection fails, it defaults to React Native CLI mode.
## π« Troubleshooting
### Metro/Expo compatibility errors
If you encounter errors related to Metro bundler or Expo CLI internals like:
- `Package subpath './src/lib/TerminalReporter' is not defined by 'exports'`
- `Cannot find module 'metro/src/lib/TerminalReporter'`
Try one of these solutions:
1. Force React Native CLI mode:
```bash
export FORCE_PROJECT_TYPE="react-native-cli"
npx react-native-device-runner
--no-bundler option (for Expo projects):npx expo run:ios --device YOUR_DEVICE_ID --no-bundler
npx expo run:android --device YOUR_DEVICE_ID --no-bundler
npx expo install metro metro-resolver
Note: The tool automatically uses
Debugbuild configuration for iOS anddebugvariant for Android - you don't need to specify these values.
adb devicesnpx expo config --json (for Expo)jq if needed: brew install jq (macOS) or apt install jq (Ubuntu)This project is licensed under the MIT License. See LICENSE for details.
FAQs
π Auto device detection & React Native/Expo app runner script
The npm package react-native-device-runner receives a total of 3 weekly downloads. As such, react-native-device-runner popularity was classified as not popular.
We found that react-native-device-runner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.