@@ -8,7 +8,9 @@ export class RunCommandBase implements ICommand {
88protected $emulatorPlatformService : IEmulatorPlatformService ,
99protected $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
1010private $devicesService : Mobile . IDevicesService ,
11- private $hostInfo : IHostInfo ) {
11+ private $hostInfo : IHostInfo ,
12+ private $iosDeviceOperations : IIOSDeviceOperations ,
13+ private $mobileHelper : Mobile . IMobileHelper ) {
1214this . $projectData . initializeProjectData ( ) ;
1315}
1416
@@ -56,7 +58,6 @@ export class RunCommandBase implements ICommand {
5658
5759await this . $platformService . buildPlatform ( d . deviceInfo . platform , buildConfig , this . $projectData ) ;
5860const pathToBuildResult = await this . $platformService . lastOutputPath ( d . deviceInfo . platform , buildConfig , this . $projectData ) ;
59- console . log ( "3##### return path to buildResult = " , pathToBuildResult ) ;
6061return pathToBuildResult ;
6162}
6263} ;
@@ -75,8 +76,11 @@ export class RunCommandBase implements ICommand {
7576// return this.$platformService.trackProjectType(this.$projectData);
7677// }
7778
78- // TODO: Fix this call
79- const liveSyncInfo : ILiveSyncInfo = { projectDir : this . $projectData . projectDir , skipWatcher : ! this . $options . watch || this . $options . justlaunch , watchAllFiles : this . $options . syncAllFiles } ;
79+ if ( ( ! this . platform || this . $mobileHelper . isiOSPlatform ( this . platform ) ) && ( this . $options . watch || ! this . $options . justlaunch ) ) {
80+ this . $iosDeviceOperations . setShouldDispose ( false ) ;
81+ }
82+
83+ const liveSyncInfo : ILiveSyncInfo = { projectDir : this . $projectData . projectDir , skipWatcher : ! this . $options . watch , watchAllFiles : this . $options . syncAllFiles } ;
8084await this . $liveSyncService . liveSync ( deviceDescriptors , liveSyncInfo ) ;
8185}
8286}
@@ -97,8 +101,10 @@ export class RunIosCommand extends RunCommandBase implements ICommand {
97101$options : IOptions ,
98102$emulatorPlatformService : IEmulatorPlatformService ,
99103$devicesService : Mobile . IDevicesService ,
100- $hostInfo : IHostInfo ) {
101- super ( $platformService , $liveSyncService , $projectData , $options , $emulatorPlatformService , $devicePlatformsConstants , $devicesService , $hostInfo ) ;
104+ $hostInfo : IHostInfo ,
105+ $iosDeviceOperations : IIOSDeviceOperations ,
106+ $mobileHelper : Mobile . IMobileHelper ) {
107+ super ( $platformService , $liveSyncService , $projectData , $options , $emulatorPlatformService , $devicePlatformsConstants , $devicesService , $hostInfo , $iosDeviceOperations , $mobileHelper ) ;
102108}
103109
104110public async execute ( args : string [ ] ) : Promise < void > {
@@ -131,8 +137,10 @@ export class RunAndroidCommand extends RunCommandBase implements ICommand {
131137$options : IOptions ,
132138$emulatorPlatformService : IEmulatorPlatformService ,
133139$devicesService : Mobile . IDevicesService ,
134- $hostInfo : IHostInfo ) {
135- super ( $platformService , $liveSyncService , $projectData , $options , $emulatorPlatformService , $devicePlatformsConstants , $devicesService , $hostInfo ) ;
140+ $hostInfo : IHostInfo ,
141+ $iosDeviceOperations : IIOSDeviceOperations ,
142+ $mobileHelper : Mobile . IMobileHelper ) {
143+ super ( $platformService , $liveSyncService , $projectData , $options , $emulatorPlatformService , $devicePlatformsConstants , $devicesService , $hostInfo , $iosDeviceOperations , $mobileHelper ) ;
136144}
137145
138146public async execute ( args : string [ ] ) : Promise < void > {
0 commit comments