What is native-run?
The native-run npm package is a utility for running native binaries on connected devices and emulators. It is commonly used in the context of mobile development, particularly for running and debugging applications on iOS and Android devices.
What are native-run's main functionalities?
Run Android App
This feature allows you to run an Android application on a connected device or emulator. You need to specify the path to the APK file of the application you want to run.
native-run android --app path/to/your/app.apk
Run iOS App
This feature allows you to run an iOS application on a connected device or simulator. You need to specify the path to the .app file of the application you want to run.
native-run ios --app path/to/your/app.app
List Connected Devices
This feature lists all the connected Android devices and emulators. It helps you identify the devices available for running your application.
native-run android --list
List iOS Simulators
This feature lists all the available iOS simulators. It helps you identify the simulators available for running your application.
native-run ios --list
Other packages similar to native-run
adb
The adb (Android Debug Bridge) package is a versatile command-line tool that lets you communicate with a device. It offers more granular control over Android devices compared to native-run, including installing and debugging apps, accessing a Unix shell, and more.
ios-deploy
The ios-deploy package is a command-line utility for deploying iOS apps to physical devices. It is similar to native-run but focuses solely on iOS, providing functionalities like installing and launching apps on iOS devices.
expo-cli
The expo-cli package is a command-line tool for developing and building React Native apps. While it offers broader functionalities for app development, it also includes features for running apps on both iOS and Android devices, similar to native-run.
native-run
native-run
is a cross-platform command-line utility for running native app binaries (.ipa
and .apk
files) on iOS and Android devices. It can be used for both hardware and virtual devices.
This tool is used by the Ionic CLI, but it can be used standalone as part of a development or testing pipeline for launching apps. It doesn't matter whether the .apk
or .ipa
is created with Cordova or native IDEs, native-run
will be able to deploy it.
Install
native-run
is written entirely in TypeScript/NodeJS, so there are no native dependencies.
To install, run:
npm install -g native-run
:memo: Requires NodeJS 16+
Usage
native-run <platform> [options]
See the help documentation with the --help
flag.
native-run --help
native-run ios --help
native-run android --help
Troubleshooting
Much more information can be printed to the screen with the --verbose
flag.