Skip to content

Commit c90ac1a

Browse files
committed
chore(release): 4.2.3
1 parent 9086681 commit c90ac1a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lib/iphone-simulator-common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function getInstalledApplications(deviceId: string): IApplication[] {
4343
return result;
4444
}
4545

46-
export function startSimulator(deviceId: string): void {
46+
export function startSimulator(deviceId?: string): void {
4747
let simulatorPath = path.resolve(xcode.getPathFromXcodeSelect(), "Applications", "Simulator.app");
4848
let args = ["open", simulatorPath];
4949
if (deviceId) {

lib/iphone-simulator-xcode-simctl.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
258258
}
259259

260260
private isDeviceBooted(device: IDevice): boolean {
261+
if(!device) {
262+
return false;
263+
}
264+
261265
return device.state === 'Booted';
262266
}
263267

@@ -287,16 +291,14 @@ export class XCodeSimctlSimulator extends IPhoneSimulatorNameGetter implements I
287291

288292
if (!device || !this.isDeviceBooted(device)) {
289293
const isSimulatorAppRunning = this.isSimulatorAppRunning();
290-
const haveBootedDevices = this.haveBootedDevices();
294+
const haveBootedDevices = await this.haveBootedDevices();
291295

292296
if (isSimulatorAppRunning) {
293297
// In case user closes simulator window but simulator app is still alive
294298
if (!haveBootedDevices) {
295299
device = await this.getDeviceToRun(options);
296300
}
297301
this.simctl.boot(device.id);
298-
} else {
299-
common.startSimulator(device && device.id);
300302
}
301303

302304
common.startSimulator(device && device.id);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ios-sim-portable",
3-
"version": "4.2.2",
3+
"version": "4.2.3",
44
"description": "",
55
"main": "./lib/ios-sim.js",
66
"scripts": {

0 commit comments

Comments
 (0)