@@ -23,7 +23,11 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
2323 super ( platformsDataService , device ) ;
2424 }
2525
26- private canRefreshWithNotification ( projectData : IProjectData ) : boolean {
26+ private canRefreshWithNotification ( projectData : IProjectData , liveSyncInfo ?: ILiveSyncResultInfo ) : boolean {
27+ if ( liveSyncInfo && liveSyncInfo . forceRefreshWithSocket ) {
28+ return false ;
29+ }
30+
2731 if ( this . device . isEmulator ) {
2832 return false ;
2933 }
@@ -72,7 +76,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
7276 shouldRestart = true ;
7377 } else {
7478 const canExecuteFastSync = this . canExecuteFastSyncForPaths ( liveSyncInfo , localToDevicePaths , projectData , deviceAppData . platform ) ;
75- const isRefreshConnectionSetup = this . canRefreshWithNotification ( projectData ) || ( ! this . device . isOnlyWiFiConnected && await this . setupSocketIfNeeded ( projectData ) ) ;
79+ const isRefreshConnectionSetup = this . canRefreshWithNotification ( projectData , liveSyncInfo ) || ( ! this . device . isOnlyWiFiConnected && await this . setupSocketIfNeeded ( projectData ) ) ;
7680 if ( ! canExecuteFastSync || ! isRefreshConnectionSetup ) {
7781 shouldRestart = true ;
7882 }
@@ -93,7 +97,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
9397
9498 try {
9599 if ( otherFiles . length ) {
96- didRefresh = await this . refreshApplicationCore ( projectData ) ;
100+ didRefresh = await this . refreshApplicationCore ( projectData , liveSyncInfo ) ;
97101 }
98102 } catch ( e ) {
99103 didRefresh = false ;
@@ -102,9 +106,9 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
102106 return didRefresh ;
103107 }
104108
105- private async refreshApplicationCore ( projectData : IProjectData ) {
109+ private async refreshApplicationCore ( projectData : IProjectData , liveSyncInfo : ILiveSyncResultInfo ) {
106110 let didRefresh = true ;
107- if ( this . canRefreshWithNotification ( projectData ) ) {
111+ if ( this . canRefreshWithNotification ( projectData , liveSyncInfo ) ) {
108112 didRefresh = await this . refreshWithNotification ( projectData ) ;
109113 } else {
110114 if ( await this . setupSocketIfNeeded ( projectData ) ) {
0 commit comments