Skip to content

Commit 74f2906

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Don't try to execute fast livesync if the project has framework version lower than 1.5.0
1 parent c579ae8 commit 74f2906

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/services/usb-livesync-service.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
4949

5050
let platformData = this.$platformsData.getPlatformData(platformLowerCase);
5151

52+
this.$projectDataService.initialize(this.$projectData.projectDir);
53+
let frameworkVersion = this.$projectDataService.getValue(platformData.frameworkPackageName).wait().version;
54+
5255
if (platformLowerCase === this.$devicePlatformsConstants.Android.toLowerCase()) {
53-
this.$projectDataService.initialize(this.$projectData.projectDir);
54-
let frameworkVersion = this.$projectDataService.getValue(platformData.frameworkPackageName).wait().version;
5556
if (semver.lt(frameworkVersion, "1.2.1")) {
5657
let shouldUpdate = this.$prompter.confirm(
5758
"You need Android Runtime 1.2.1 or later for LiveSync to work properly. Do you want to update your runtime now?"
@@ -139,6 +140,8 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
139140
return platformSpecificUsbLiveSyncService.sendPageReloadMessageToDevice(deviceAppData).wait();
140141
});
141142
}
143+
144+
this.$logger.info(`Successfully synced application ${this.$projectData.projectId}.`);
142145
}).future<void>()();
143146
});
144147
};
@@ -156,7 +159,7 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
156159
beforeLiveSyncAction: beforeLiveSyncAction,
157160
beforeBatchLiveSyncAction: beforeBatchLiveSyncAction,
158161
iOSSimulatorRelativeToProjectBasePathAction: iOSSimulatorRelativeToProjectBasePathAction,
159-
canExecuteFastLiveSync: (filePath: string) => _.contains(fastLivesyncFileExtensions, path.extname(filePath)),
162+
canExecuteFastLiveSync: (filePath: string) => _.contains(fastLivesyncFileExtensions, path.extname(filePath)) && semver.gte(frameworkVersion, "1.5.0"),
160163
fastLiveSync: fastLiveSync
161164
};
162165

0 commit comments

Comments
 (0)