@@ -24,8 +24,11 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
24
24
$logger : ILogger ,
25
25
private $injector : IInjector ,
26
26
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 ) ;
29
32
}
30
33
31
34
public liveSync ( platform : string ) : IFuture < void > {
@@ -45,6 +48,10 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
45
48
return this . $platformService . deployOnDevice ( platform ) ;
46
49
}
47
50
51
+ let notRunningiOSSimulatorAction = ( ) : IFuture < void > => {
52
+ return this . $platformService . deployOnEmulator ( this . $devicePlatformsConstants . iOS . toLowerCase ( ) ) ;
53
+ }
54
+
48
55
let beforeBatchLiveSyncAction = ( filePath : string ) : IFuture < string > => {
49
56
return ( ( ) => {
50
57
this . $platformService . preparePlatform ( platform ) . wait ( ) ;
@@ -60,8 +67,9 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
60
67
}
61
68
62
69
let watchGlob = path . join ( this . $projectData . projectDir , constants . APP_FOLDER_NAME ) ;
70
+ let localProjectRootPath = platform . toLowerCase ( ) === "ios" ? platformData . appDestinationDirectoryPath : null ;
63
71
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 ( ) ;
65
73
} ) . future < void > ( ) ( ) ;
66
74
}
67
75
0 commit comments