Skip to content

Commit bc1fe5c

Browse files
author
Mitko-Kerezov
committed
Respect optional deviceName parameter passed
However, use the name passed as a command-line option with priority. Note that ios-sim-portable should be refactored to take the currently running simulator into account on its own, instead of having to pass it as a param from the outside.
1 parent 62600b0 commit bc1fe5c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/declarations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ interface ISimulator extends INameGetter {
6060
}
6161

6262
interface INameGetter {
63-
getSimulatorName(deviceId: string): string;
63+
getSimulatorName(deviceName?: string): string;
6464
}
6565

6666
interface IApplication {

lib/iphone-simulator-name-getter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ export abstract class IPhoneSimulatorNameGetter implements INameGetter {
77

88
public defaultDeviceIdentifier: string;
99

10-
public getSimulatorName(): string {
10+
public getSimulatorName(deviceName?: string): string {
1111
if (!this._simulatorName) {
12-
this._simulatorName = options.device || this.defaultDeviceIdentifier;
12+
this._simulatorName = options.device || deviceName || this.defaultDeviceIdentifier;
1313
}
1414

1515
return this._simulatorName;

0 commit comments

Comments
 (0)