Skip to content
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

Push, pull and merge? #69

Open
NorbNorb opened this issue Jul 16, 2014 · 0 comments
Open

Push, pull and merge? #69

NorbNorb opened this issue Jul 16, 2014 · 0 comments

Comments

@NorbNorb
Copy link

If I have three devices A, B and C, all working on their own local stores first (iCloud disabled).
How can I

  • Push:
    Device A enables cloud and uses its local store to overwrite any data in iCloud and other devices can pull from there.
  • Pull:
    Device B enables cloud and deletes its local cloud store for rebuilding it from iCloud.
  • Merge:
    Device C enables cloud and keeps its local data, but merges incoming transaction logs.

My implementations so far are:

  • Push:
[[[AppDelegate sharedAppDelegate] ubiquityStoreManager] deleteCloudContainerLocalOnly:NO];
[[[AppDelegate sharedAppDelegate] ubiquityStoreManager] setCloudEnabled:YES];
  • Pull:
[[[AppDelegate sharedAppDelegate] ubiquityStoreManager] deleteCloudContainerLocalOnly:YES];
[[[AppDelegate sharedAppDelegate] ubiquityStoreManager] deleteLocalStore];
[[[AppDelegate sharedAppDelegate] ubiquityStoreManager] setCloudEnabled:YES];
  • Merge:
[[[AppDelegate sharedAppDelegate] ubiquityStoreManager] deleteCloudContainerLocalOnly:YES];
[[[AppDelegate sharedAppDelegate] ubiquityStoreManager] setCloudEnabled:YES];

Our observations are that a push of device A followed by a pull of device B work if iCloud wasn't populated before. Devices will be in sync then. But if the devices disable iCloud again and make another push & pull procedure, all pulling devices don't show any data.

We can get the devices back in sync if we do a
objective-c[[[AppDelegate sharedAppDelegate] ubiquityStoreManager] deleteCloudContainerLocalOnly:NO]; wait for a short time and then hit the the push and pull buttons on the devices again.

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

No branches or pull requests

1 participant