Closed dstranz closed 4 years ago
It probably should be ignored, but I'd like to understand why this happens. By any chance do you know how easy to reproduce this is? Was the object deleted halfway through a sync?
I'm trying to reproduce it on my device, but yes, it was related to some remove / insert CD objects operations.
OK, I'm able to reproduce it. I have 2 Core Data entities A and B with relation A(1) to B(N).
When I'm doing that several times and restart app CloudKit crashes.
Is that happening halfway through the synchronisation?
It's crashing when I'm calling synchronize()
in AppDelegate during launch.
Ok, my first instinct would be to recommend using fully unique identifiers, since B1 and B1' are not really the same object. You could use UDIDs and still keep a property with your own different identifier, so even if they're different objects to CloudKit they can still be considered the same by your app.
@mentrena Yes, after further tests it's definitely related to reusing the same uniqueId.
Cool, I'm closing the issue, feel free to reopen or get in touch if you have more questions about this.
We are experiencing a crash in recordToUpload method when originalObject is nil.
I'm not sure if such record should be totally ignored during sync or deleted from iCloud?