Skip to content

Commit 50bde11

Browse files
author
Tsvetan Raikov
committed
Fixed: First time livesync syncs only on device even when simulator is running
1 parent 07849d6 commit 50bde11

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

lib/services/livesync/ios-platform-livesync-service.ts

+2-14
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,9 @@ class IOSPlatformLiveSyncService extends PlatformLiveSyncServiceBase {
4949

5050
protected getCanExecuteActionCore(platform: string, appIdentifier: string): (dev: Mobile.IDevice) => boolean {
5151
if (this.$options.emulator) {
52-
return (device: Mobile.IDevice): boolean => this.$devicesService.isiOSSimulator(device);
52+
return (device: Mobile.IDevice): boolean => this.$devicesService.isiOSSimulator(device);
5353
} else {
54-
let devices = this.$devicesService.getDevicesForPlatform(platform);
55-
let simulator = _.find(devices, d => this.$devicesService.isiOSSimulator(d));
56-
if (simulator) {
57-
let iOSDevices = _.filter(devices, d => d.deviceInfo.identifier !== simulator.deviceInfo.identifier);
58-
if (iOSDevices && iOSDevices.length) {
59-
let isApplicationInstalledOnSimulator = simulator.applicationManager.isApplicationInstalled(appIdentifier).wait();
60-
let isApplicationInstalledOnAllDevices = _.intersection.apply(null, iOSDevices.map(device => device.applicationManager.isApplicationInstalled(appIdentifier).wait()));
61-
// In case the application is not installed on both device and simulator, syncs only on device.
62-
if (!isApplicationInstalledOnSimulator && !isApplicationInstalledOnAllDevices) {
63-
return (device: Mobile.IDevice): boolean => this.$devicesService.isiOSDevice(device);
64-
}
65-
}
66-
}
54+
return (device: Mobile.IDevice) => true;
6755
}
6856
}
6957
}

0 commit comments

Comments
 (0)