Skip to content

Commit 23bfd8a

Browse files
author
Fatme
authored
Merge pull request #104 from telerik/fatme/fix-device-id-check
Verify device id before running the simulator
2 parents f70ce58 + 301139f commit 23bfd8a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/iphone-simulator-xcode-simctl.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,15 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
234234
}
235235

236236
public startSimulator(device?: IDevice): void {
237-
if (!device || !device.runtimeVersion || !device.fullId) {
238-
device = this.getDeviceToRun(device);
239-
}
240-
241237
// In case the id is undefined, skip verification - we'll start default simulator.
242-
if (device.id) {
238+
if (device && device.id) {
243239
this.verifyDevice(device);
244240
}
245241

242+
if (!device || !device.runtimeVersion || !device.fullId) {
243+
device = this.getDeviceToRun(device);
244+
}
245+
246246
if (!this.isDeviceBooted(device)) {
247247
const isSimulatorAppRunning = this.isSimulatorAppRunning();
248248
const haveBootedDevices = this.haveBootedDevices();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ios-sim-portable",
3-
"version": "3.3.2",
3+
"version": "3.3.3",
44
"description": "",
55
"main": "./lib/ios-sim.js",
66
"scripts": {

0 commit comments

Comments
 (0)