cli icon indicating copy to clipboard operation
cli copied to clipboard

chore(run-android): deprecate `--deviceId` in favour of `--device`

Open szymonrybczak opened this issue 1 year ago • 1 comments

Summary:

To avoid confusion between run-android and run-ios, I deprecated --device-id in favour of --device. When someone will use --device-id` a warning will be presented, so that users can migrate their scripts.

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js run-android --deviceId "asdf"

Should give the warning and pass id the same way as before. 3. Run this command:

node /path/to/react-native-cli/packages/cli/build/bin.js run-android --device "asdf"

Should launch an app on passed id.

Checklist

  • [x] Documentation is up to date to reflect these changes.
  • [x] Follows commit message convention described in CONTRIBUTING.md

szymonrybczak avatar May 06 '24 17:05 szymonrybczak

Unfortunately, to my knowledge, adb devices doesn't provide as much information about emulators/physical devices as Apple's commands do, so I had to limit the options' features compared to run-ios's.

szymonrybczak avatar May 06 '24 17:05 szymonrybczak