Skip to content

Fixed: Livesync not working when started for the first time on device #2123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 13, 2016

Conversation

tzraikov
Copy link
Contributor

Fixes #2072

@tzraikov tzraikov force-pushed the raikov/fix-first-time-livesync branch from 4bc8b4a to 08fa8d7 Compare October 12, 2016 15:07
@@ -29,10 +29,11 @@ class IOSPlatformLiveSyncService extends PlatformLiveSyncServiceBase {
let localToDevicePaths = this.$projectFilesManager.createLocalToDevicePaths(deviceAppData, projectFilesPath, null, this.liveSyncData.excludedProjectDirsAndFiles);
let afterSyncAction: () => IFuture<void>;

this.transferFiles(deviceAppData, localToDevicePaths, this.liveSyncData.projectFilesPath, true).wait();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how will this code work in case the application is not installed on device? Where will it transfer the files as there's no sandbox on device (/Library/Application Support directory for current app)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually this code executes after the application is installed on device. Note that the installed flag indicates whether the tryInstallApplication installed the app. If it returns false, then the app was already installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to synchronize all files the first time when livesync is called, because all consequent updates will be partial and it will bring inconsistence. The app will not be able to find all js files and it will crash.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, the name installed confused me.

@tzraikov tzraikov merged commit f66e1e2 into master Oct 13, 2016
@tzraikov tzraikov deleted the raikov/fix-first-time-livesync branch October 13, 2016 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants