@@ -8,7 +8,9 @@ export class RunCommandBase implements ICommand {
8
8
protected $emulatorPlatformService : IEmulatorPlatformService ,
9
9
protected $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
10
10
private $devicesService : Mobile . IDevicesService ,
11
- private $hostInfo : IHostInfo ) {
11
+ private $hostInfo : IHostInfo ,
12
+ private $iosDeviceOperations : IIOSDeviceOperations ,
13
+ private $mobileHelper : Mobile . IMobileHelper ) {
12
14
this . $projectData . initializeProjectData ( ) ;
13
15
}
14
16
@@ -56,7 +58,6 @@ export class RunCommandBase implements ICommand {
56
58
57
59
await this . $platformService . buildPlatform ( d . deviceInfo . platform , buildConfig , this . $projectData ) ;
58
60
const pathToBuildResult = await this . $platformService . lastOutputPath ( d . deviceInfo . platform , buildConfig , this . $projectData ) ;
59
- console . log ( "3##### return path to buildResult = " , pathToBuildResult ) ;
60
61
return pathToBuildResult ;
61
62
}
62
63
} ;
@@ -75,8 +76,11 @@ export class RunCommandBase implements ICommand {
75
76
// return this.$platformService.trackProjectType(this.$projectData);
76
77
// }
77
78
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 } ;
80
84
await this . $liveSyncService . liveSync ( deviceDescriptors , liveSyncInfo ) ;
81
85
}
82
86
}
@@ -97,8 +101,10 @@ export class RunIosCommand extends RunCommandBase implements ICommand {
97
101
$options : IOptions ,
98
102
$emulatorPlatformService : IEmulatorPlatformService ,
99
103
$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 ) ;
102
108
}
103
109
104
110
public async execute ( args : string [ ] ) : Promise < void > {
@@ -131,8 +137,10 @@ export class RunAndroidCommand extends RunCommandBase implements ICommand {
131
137
$options : IOptions ,
132
138
$emulatorPlatformService : IEmulatorPlatformService ,
133
139
$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 ) ;
136
144
}
137
145
138
146
public async execute ( args : string [ ] ) : Promise < void > {
0 commit comments