Graph icon indicating copy to clipboard operation
Graph copied to clipboard

iCloud doesn't sync

Open Giulioo opened this issue 7 years ago • 16 comments

When I launch the app, the database storage isn't synchronizing, but after some other launch, the database is synchronizing correctly. I'm using iCloud storage, but it doesn't work correctly. I've enabled iCloud in the capabilities of the project and I use Graph(cloud: "fancyName") to initialize the database and after graphDidPrepareCloudStorage I load all the data.

I didn't found any documentation for the iCloud support, where can I find it?

Any help, please?

Giulioo avatar Sep 20 '18 14:09 Giulioo

@Giulioo Can you share your setup?

daniel-jonathan avatar Sep 20 '18 14:09 daniel-jonathan

@danieldahan I'm using Xcode 10, Swift 4.2 and testing on an iPhone 6 on iOS 12 (before on iOS 11) In the iCloud capabilities is checked only iCloud Documents and it uses the default container, no red warning.

I initialize the database and set its delegate like this: ` database = Graph(cloud: "iCloudContainer", completion: { (success, error) in

        self.database.delegate = self
    }) `

and in the graphDidPrepareCloudStorage I call a function that makes a search to load all the preexisting data

Giulioo avatar Sep 20 '18 14:09 Giulioo

@Giulioo Thank you for that information. @OrkhanAlikhanov and I will test Graph, and see if there are any changes necessary for iOS 12.

daniel-jonathan avatar Sep 20 '18 15:09 daniel-jonathan

@danieldahan Great, thank you! It didn't work well also on iOS 11, maybe I have to configure something else?

Giulioo avatar Sep 20 '18 15:09 Giulioo

@Giulioo Generally iCloud is very tricky, and not necessarily the best. I find it slow to update.

daniel-jonathan avatar Sep 20 '18 16:09 daniel-jonathan

@danieldahan Graph with iCloud worked on iOS 11 right? I couldn't find any documentation about how to implement it, so I don't know if I'm doing it right. In the iCloud capabilities is only checked iCloud Documents, is it right? Do I have to configure something on the iCloud dashboard for the container?

Giulioo avatar Sep 20 '18 16:09 Giulioo

@Giulioo All should work, but let's move this chat to Slack. If you would like, please send your email and name to [email protected], and I can add you to our #opensource channel.

daniel-jonathan avatar Sep 20 '18 16:09 daniel-jonathan

@danieldahan Ok, I'll send the email

Giulioo avatar Sep 20 '18 16:09 Giulioo

Thank you, I am closing this issue.

daniel-jonathan avatar Sep 20 '18 16:09 daniel-jonathan

hi i have the exact same problem, how can i fix it?

giuliomignemi avatar Nov 11 '19 19:11 giuliomignemi

@giuliomignemi can you share more details, and your setup code please? What are you testing on, which OS are you using... thank you!

daniel-jonathan avatar Nov 11 '19 23:11 daniel-jonathan

This is my manager, I use Xcode 11.2 and swift 5, sometimes it synchronizes with icloud and sometimes it doesn't synchronize completely

GraphManager.swift.zip

giuliomignemi avatar Nov 11 '19 23:11 giuliomignemi

I hope you can help me

giuliomignemi avatar Nov 12 '19 20:11 giuliomignemi

@giuliomignemi thank you! I will have to look at this over the weekend. I reopened the issue for you.

daniel-jonathan avatar Nov 13 '19 18:11 daniel-jonathan

thank you!

giuliomignemi avatar Nov 13 '19 19:11 giuliomignemi

have some news?

giuliomignemi avatar Nov 27 '19 13:11 giuliomignemi