Skip to content

Command "emulate" and options "--emulator/--device/--avd" are a bit confusing to use #2349

@pkoleva

Description

@pkoleva

emulate command is used to run an app on an emulator but we already have options to specify on what device to run the app.
The different options that one can use to define deployment target are behaving differently
--device - can be used to specify which device to be targeted and accepts device id and device name for some commands -> related issue 2345

run --emulator = emulate, but the option does not accept any parameters - related 2329

If emulate command is removed, to specify which device you'll use, you'll have to type the below command
tns run android/ios --emulator --device {DeviceName/Id}

I think we should agree on some kind of flow that covers the most common use cases.

For me the way I use these options is something like that ->
Option 1 - no emulate command
tns run/debug/deploy/livesync --emulator - starts emulator and ignores all connected real devices
tns run/debug/deploy/livesync --emulator {EmulatorName/Id} - starts/connects to specified emulator or if it doesn't exist give a meaningful error message
'tns run/debug/deploy/livesync --device {EmulatorName/Id}' - starts/connects to specified emulator or if it doesn't exist give a meaningful error message
Option 2 - no --emulator option
tns emulate - starts emulator and runs app on it, ignores all connected real devices
tns emulate --device {DeviceName/Id} - starts emulator with specified name and runs the app on it
'tns run/debug/deploy/livesync --device {EmulatorName/Id}' - starts/connects to specified emulator or if it doesn't exist give a meaningful error message

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions