Skip to content

Commit 85f1818

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

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

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

+1-17
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,7 @@ class IOSPlatformLiveSyncService extends PlatformLiveSyncServiceBase {
4848
}
4949

5050
protected getCanExecuteActionCore(platform: string, appIdentifier: string): (dev: Mobile.IDevice) => boolean {
51-
if (this.$options.emulator) {
52-
return (device: Mobile.IDevice): boolean => this.$devicesService.isiOSSimulator(device);
53-
} 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-
}
67-
}
51+
return (device: Mobile.IDevice) => true;
6852
}
6953
}
7054

0 commit comments

Comments
 (0)