Skip to content

Commit 2198a33

Browse files
Fatme HavaluovaFatme Havaluova
authored andcommitted
Fix broken rebase
1 parent d32c238 commit 2198a33

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/iphone-simulator-xcode-6.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@ export class XCode6Simulator extends iPhoneSimulatorBaseLib.IPhoneInteropSimulat
1818

1919
constructor() {
2020
super(this);
21-
21+
2222
this.cachedDevices = null;
2323
}
2424

2525
public setSimulatedDevice(config: any): void {
26-
let device = this.getDeviceByName().device;
26+
let device = this.getDeviceByName().rawDevice;
2727
config("setDevice", device);
2828
}
2929

3030
public getSimulatedDevice(): any {
31-
return this.getDeviceByName().device;
31+
return this.getDeviceByName().rawDevice;
3232
}
3333

3434
public getDevices(): IFuture<IDevice[]> {
@@ -57,7 +57,7 @@ export class XCode6Simulator extends iPhoneSimulatorBaseLib.IPhoneInteropSimulat
5757
let runtimeVersion = device("runtime")("versionString").toString();
5858

5959
this.cachedDevices.push({
60-
name: "",
60+
name: deviceIdentifierWithoutPrefix,
6161
id: deviceIdentifierWithoutPrefix,
6262
fullId: this.buildFullDeviceIdentifier(deviceIdentifier),
6363
runtimeVersion: runtimeVersion,
@@ -109,8 +109,9 @@ export class XCode6Simulator extends iPhoneSimulatorBaseLib.IPhoneInteropSimulat
109109
return options.device || XCode6Simulator.DEFAULT_DEVICE_IDENTIFIER;
110110
}
111111

112-
private getDeviceByName(): any {
113-
let device = _.find(this.devices, (device) => device.name === this.deviceName);
112+
private getDeviceByName(): IDevice {
113+
let devices = this.getDevices().wait();
114+
let device = _.find(devices, (device) => device.name === this.deviceName);
114115
if(!device) {
115116
errors.fail("Unable to find device with name ", this.deviceName);
116117
}

0 commit comments

Comments
 (0)