You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.catch(err=>console.error(`Error while trying to get system warnings: ${err}`));
1199
1202
```
1200
1203
1204
+
## devicesService
1205
+
The `devicesService` module allows interaction with devices and emualtors. You can get a list of the available emualators or start a specific emulator.
1206
+
1207
+
### getAvailableEmulators
1208
+
The `getAvailableEmulators` method returns object of all running and available emulators. The result is in the following format:
1209
+
```JavaScript
1210
+
{
1211
+
android: {
1212
+
devices:Mobile.IDeviceInfo[],
1213
+
errors: string[]
1214
+
},
1215
+
ios: {
1216
+
devices:Mobile.IDeviceInfo[],
1217
+
errors: string[]
1218
+
}
1219
+
}
1220
+
```
1221
+
1222
+
This method accepts platform parameter. If provided only devices by specified platform will be returned.
The `startEmulator` method starts the emulator specified by provided options. Returns an array of errors if something unexpected happens or null otherwise.
CLI is designed as command line tool and when it is used as a library, it does not give you access to all of the methods. This is mainly implementation detail. Most of the CLI's code is created to work in command line, not as a library, so before adding method to public API, most probably it will require some modification.
1203
1245
For example the `$options` injected module contains information about all `--` options passed on the terminal. When the CLI is used as a library, the options are not populated. Before adding method to public API, make sure its implementation does not rely on `$options`.
0 commit comments