@@ -14,7 +14,6 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
1414 private $iOSEmulatorServices : Mobile . IiOSSimulatorService ,
1515 private $iOSDebuggerPortService : IIOSDebuggerPortService ,
1616 private $logger : ILogger ,
17- private $fs : IFileSystem ,
1817 private $processService : IProcessService ,
1918 protected $platformsData : IPlatformsData ,
2019 protected device : Mobile . IiOSDevice ) {
@@ -71,8 +70,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
7170 }
7271
7372 if ( await this . setupSocketIfNeeded ( projectData ) ) {
74- await this . liveEdit ( scriptFiles ) ;
75- await this . reloadPage ( deviceAppData , otherFiles ) ;
73+ await this . reloadPage ( otherFiles ) ;
7674 } else {
7775 await this . restartApplication ( deviceAppData , projectData . projectName ) ;
7876 }
@@ -82,7 +80,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
8280 return this . device . applicationManager . restartApplication ( { appId : deviceAppData . appIdentifier , projectName } ) ;
8381 }
8482
85- private async reloadPage ( deviceAppData : Mobile . IDeviceAppData , localToDevicePaths : Mobile . ILocalToDevicePathData [ ] ) : Promise < void > {
83+ private async reloadPage ( localToDevicePaths : Mobile . ILocalToDevicePathData [ ] ) : Promise < void > {
8684 if ( localToDevicePaths . length ) {
8785 const message = JSON . stringify ( {
8886 method : "Page.reload" ,
@@ -96,22 +94,6 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
9694 }
9795 }
9896
99- private async liveEdit ( localToDevicePaths : Mobile . ILocalToDevicePathData [ ] ) : Promise < void > {
100- for ( const localToDevicePath of localToDevicePaths ) {
101- const content = this . $fs . readText ( localToDevicePath . getLocalPath ( ) ) ;
102- const message = JSON . stringify ( {
103- method : "Debugger.setScriptSource" ,
104- params : {
105- scriptUrl : localToDevicePath . getRelativeToProjectBasePath ( ) ,
106- scriptSource : content
107- } ,
108- id : ++ currentPageReloadId
109- } ) ;
110-
111- await this . sendMessage ( message ) ;
112- }
113- }
114-
11597 private attachEventHandlers ( ) : void {
11698 this . $processService . attachToProcessExitSignals ( this , this . destroySocket ) ;
11799
0 commit comments