@@ -13,20 +13,16 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I
13
13
$devicePathProvider : IDevicePathProvider ,
14
14
$logger : ILogger ,
15
15
$projectFilesProvider : IProjectFilesProvider ,
16
- private $iOSDebuggerPortService : IIOSDebuggerPortService ,
17
- ) {
18
- super ( $fs , $logger , $platformsData , $projectFilesManager , $devicePathProvider , $projectFilesProvider ) ;
19
- }
16
+ private $iOSDebuggerPortService : IIOSDebuggerPortService ) {
17
+ super ( $fs , $logger , $platformsData , $projectFilesManager , $devicePathProvider , $projectFilesProvider ) ;
18
+ }
20
19
21
20
public async fullSync ( syncInfo : IFullSyncInfo ) : Promise < ILiveSyncResultInfo > {
22
21
const device = syncInfo . device ;
23
22
24
23
if ( device . isEmulator ) {
25
24
return super . fullSync ( syncInfo ) ;
26
25
}
27
-
28
- this . $iOSDebuggerPortService . attachToDebuggerPortFoundEvent ( device , syncInfo . projectData ) ;
29
-
30
26
const projectData = syncInfo . projectData ;
31
27
const platformData = this . $platformsData . getPlatformData ( device . deviceInfo . platform , projectData ) ;
32
28
const deviceAppData = await this . getAppData ( syncInfo ) ;
@@ -70,6 +66,12 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I
70
66
}
71
67
}
72
68
69
+ public prepareForLiveSync ( device : Mobile . IDevice , data : IProjectDir , liveSyncInfo : ILiveSyncInfo ) : void {
70
+ if ( ! liveSyncInfo . skipWatcher ) {
71
+ this . $iOSDebuggerPortService . attachToDebuggerPortFoundEvent ( device , data ) ;
72
+ }
73
+ }
74
+
73
75
protected _getDeviceLiveSyncService ( device : Mobile . IDevice , data : IProjectDir ) : INativeScriptDeviceLiveSyncService {
74
76
const service = this . $injector . resolve < INativeScriptDeviceLiveSyncService > ( IOSDeviceLiveSyncService , { _device : device , data } ) ;
75
77
return service ;
0 commit comments