Skip to content

Commit 3e78aa9

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Fix livesync --emulator when the app is not installed on the iOS simulator
1 parent 97b0fd8 commit 3e78aa9

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

lib/services/test-execution-service.ts

+7
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ class TestExecutionService implements ITestExecutionService {
9595

9696
let localProjectRootPath = platform.toLowerCase() === "ios" ? platformData.appDestinationDirectoryPath : null;
9797

98+
let getApplicationPathForiOSSimulatorAction = (): IFuture<string> => {
99+
return (() => {
100+
return this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait().packageName;
101+
}).future<string>()();
102+
};
103+
98104
let liveSyncData = {
99105
platform: platform,
100106
appIdentifier: this.$projectData.projectId,
@@ -104,6 +110,7 @@ class TestExecutionService implements ITestExecutionService {
104110
platformSpecificLiveSyncServices: platformSpecificLiveSyncServices,
105111
notInstalledAppOnDeviceAction: notInstalledAppOnDeviceAction,
106112
notRunningiOSSimulatorAction: notRunningiOSSimulatorAction,
113+
getApplicationPathForiOSSimulatorAction: getApplicationPathForiOSSimulatorAction,
107114
localProjectRootPath: localProjectRootPath,
108115
beforeBatchLiveSyncAction: beforeBatchLiveSyncAction,
109116
shouldRestartApplication: (localToDevicePaths: Mobile.ILocalToDevicePathData[]) => Future.fromResult(!this.$options.debugBrk),

lib/services/usb-livesync-service.ts

+7
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
148148
});
149149
};
150150

151+
let getApplicationPathForiOSSimulatorAction = (): IFuture<string> => {
152+
return (() => {
153+
return this.$platformService.getLatestApplicationPackageForEmulator(platformData).wait().packageName;
154+
}).future<string>()();
155+
};
156+
151157
let liveSyncData = {
152158
platform: platform,
153159
appIdentifier: this.$projectData.projectId,
@@ -157,6 +163,7 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
157163
platformSpecificLiveSyncServices: platformSpecificLiveSyncServices,
158164
notInstalledAppOnDeviceAction: notInstalledAppOnDeviceAction,
159165
notRunningiOSSimulatorAction: notRunningiOSSimulatorAction,
166+
getApplicationPathForiOSSimulatorAction: getApplicationPathForiOSSimulatorAction,
160167
localProjectRootPath: localProjectRootPath,
161168
beforeLiveSyncAction: beforeLiveSyncAction,
162169
beforeBatchLiveSyncAction: beforeBatchLiveSyncAction,

0 commit comments

Comments
 (0)