-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Sync old changes, not only updates #84
Comments
While this isn't implemented, I think it's useful to mention here that we can use In my case, for my let realm = try! Realm()
var recordsToStore: [CKRecord] = []
recordsToStore += realm.objects(Note.self).map { $0.record }
recordsToStore += realm.objects(Quote.self).map { $0.record }
syncEngine?.syncRecordsToCloudKit(recordsToStore: recordsToStore, recordIDsToDelete: []) It seems to be working pretty well. |
I've made a PR #94 regarding this issue. I added a public method named However, we should NOT call |
Awesome, thank you! One more thing: how about fetching all CloudKit data for the first time? E.g., I have some data from my iPhone and then buy a new iPad and install the app… it needs to get all CloudKit data, not just the changes. Is there something like a |
@dbmrq Absolutely, "fetching all CloudKit data for the first time" is already been handled. Actually we've provided a For details, I suggest you read the source code and check CloudKit docs for more mechanism. |
Fantastic, thanks! 🎉 |
Expected behavior
Sync existing realm data to CloudKit.
Actual behavior(optional)
Objects present in the database before adding Icecream doesn´t sync.
Steps to reproduce the problem(optional)
Create a realm database without Icecream, add and setup Icrecream to your project. Only updates are pushed to the cloud.
The text was updated successfully, but these errors were encountered: