@@ -13,20 +13,16 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I
1313 $devicePathProvider : IDevicePathProvider ,
1414 $logger : ILogger ,
1515 $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+ }
2019
2120 public async fullSync ( syncInfo : IFullSyncInfo ) : Promise < ILiveSyncResultInfo > {
2221 const device = syncInfo . device ;
2322
2423 if ( device . isEmulator ) {
2524 return super . fullSync ( syncInfo ) ;
2625 }
27-
28- this . $iOSDebuggerPortService . attachToDebuggerPortFoundEvent ( device , syncInfo . projectData ) ;
29-
3026 const projectData = syncInfo . projectData ;
3127 const platformData = this . $platformsData . getPlatformData ( device . deviceInfo . platform , projectData ) ;
3228 const deviceAppData = await this . getAppData ( syncInfo ) ;
@@ -70,6 +66,12 @@ export class IOSLiveSyncService extends PlatformLiveSyncServiceBase implements I
7066 }
7167 }
7268
69+ public prepareForLiveSync ( device : Mobile . IDevice , data : IProjectDir , liveSyncInfo : ILiveSyncInfo ) : void {
70+ if ( ! liveSyncInfo . skipWatcher ) {
71+ this . $iOSDebuggerPortService . attachToDebuggerPortFoundEvent ( device , data ) ;
72+ }
73+ }
74+
7375 protected _getDeviceLiveSyncService ( device : Mobile . IDevice , data : IProjectDir ) : INativeScriptDeviceLiveSyncService {
7476 const service = this . $injector . resolve < INativeScriptDeviceLiveSyncService > ( IOSDeviceLiveSyncService , { _device : device , data } ) ;
7577 return service ;
0 commit comments