diff --git a/lib/common b/lib/common index 665ade98dd..d335e731b3 160000 --- a/lib/common +++ b/lib/common @@ -1 +1 @@ -Subproject commit 665ade98dda49b04232db6ba17288156ff393088 +Subproject commit d335e731b3a18341e516ff766fcf7c38ad98f451 diff --git a/lib/services/usb-livesync-service.ts b/lib/services/usb-livesync-service.ts index 930ad3ce4e..1c1c9c6b10 100644 --- a/lib/services/usb-livesync-service.ts +++ b/lib/services/usb-livesync-service.ts @@ -24,8 +24,11 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer $logger: ILogger, private $injector: IInjector, private $platformService: IPlatformService, - $dispatcher: IFutureDispatcher) { - super($devicesServices, $mobileHelper, $localToDevicePathDataFactory, $logger, $options, $deviceAppDataFactory, $fs, $dispatcher); + $dispatcher: IFutureDispatcher, + $childProcess: IChildProcess, + $iOSEmulatorServices: Mobile.IiOSSimulatorService, + private $devicePlatformsConstants: Mobile.IDevicePlatformsConstants) { + super($devicesServices, $mobileHelper, $localToDevicePathDataFactory, $logger, $options, $deviceAppDataFactory, $fs, $dispatcher, $childProcess, $iOSEmulatorServices); } public liveSync(platform: string): IFuture { @@ -45,6 +48,10 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer return this.$platformService.deployOnDevice(platform); } + let notRunningiOSSimulatorAction = (): IFuture => { + return this.$platformService.deployOnEmulator(this.$devicePlatformsConstants.iOS.toLowerCase()); + } + let beforeBatchLiveSyncAction = (filePath: string): IFuture => { return (() => { this.$platformService.preparePlatform(platform).wait(); @@ -60,8 +67,9 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer } let watchGlob = path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME); + let localProjectRootPath = platform.toLowerCase() === "ios" ? platformData.appDestinationDirectoryPath : null; - this.sync(platform, this.$projectData.projectId, projectFilesPath, this.excludedProjectDirsAndFiles, watchGlob, restartAppOnDeviceAction, notInstalledAppOnDeviceAction, beforeLiveSyncAction, beforeBatchLiveSyncAction).wait(); + this.sync(platform, this.$projectData.projectId, projectFilesPath, this.excludedProjectDirsAndFiles, watchGlob, restartAppOnDeviceAction, notInstalledAppOnDeviceAction, notRunningiOSSimulatorAction, localProjectRootPath, beforeLiveSyncAction, beforeBatchLiveSyncAction).wait(); }).future()(); }