@@ -24,8 +24,11 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
2424 $logger : ILogger ,
2525 private $injector : IInjector ,
2626 private $platformService : IPlatformService ,
27- $dispatcher : IFutureDispatcher ) {
28- super ( $devicesServices , $mobileHelper , $localToDevicePathDataFactory , $logger , $options , $deviceAppDataFactory , $fs , $dispatcher ) ;
27+ $dispatcher : IFutureDispatcher ,
28+ $childProcess : IChildProcess ,
29+ $iOSEmulatorServices : Mobile . IiOSSimulatorService ,
30+ private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ) {
31+ super ( $devicesServices , $mobileHelper , $localToDevicePathDataFactory , $logger , $options , $deviceAppDataFactory , $fs , $dispatcher , $childProcess , $iOSEmulatorServices ) ;
2932 }
3033
3134 public liveSync ( platform : string ) : IFuture < void > {
@@ -45,6 +48,10 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
4548 return this . $platformService . deployOnDevice ( platform ) ;
4649 }
4750
51+ let notRunningiOSSimulatorAction = ( ) : IFuture < void > => {
52+ return this . $platformService . deployOnEmulator ( this . $devicePlatformsConstants . iOS . toLowerCase ( ) ) ;
53+ }
54+
4855 let beforeBatchLiveSyncAction = ( filePath : string ) : IFuture < string > => {
4956 return ( ( ) => {
5057 this . $platformService . preparePlatform ( platform ) . wait ( ) ;
@@ -60,8 +67,9 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
6067 }
6168
6269 let watchGlob = path . join ( this . $projectData . projectDir , constants . APP_FOLDER_NAME ) ;
70+ let localProjectRootPath = platform . toLowerCase ( ) === "ios" ? platformData . appDestinationDirectoryPath : null ;
6371
64- this . sync ( platform , this . $projectData . projectId , projectFilesPath , this . excludedProjectDirsAndFiles , watchGlob , restartAppOnDeviceAction , notInstalledAppOnDeviceAction , beforeLiveSyncAction , beforeBatchLiveSyncAction ) . wait ( ) ;
72+ this . sync ( platform , this . $projectData . projectId , projectFilesPath , this . excludedProjectDirsAndFiles , watchGlob , restartAppOnDeviceAction , notInstalledAppOnDeviceAction , notRunningiOSSimulatorAction , localProjectRootPath , beforeLiveSyncAction , beforeBatchLiveSyncAction ) . wait ( ) ;
6573 } ) . future < void > ( ) ( ) ;
6674 }
6775
0 commit comments