Core Data iCloud sync falsely reports "appears an updated object … was deleted"
| Originator: | chbeer78 | ||
| Number: | rdar://11073403 | Date Originated: | 19-Mar-2012 05:13 PM |
| Status: | Open | Resolved: | |
| Product: | iCloud | Product Version: | iOS 5.1 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary:
When syncing data between two instances of my app via iCloud (Core Data), sometimes the following error occurs: "appears an updated object: <object-id-url>/p287 was deleted.". In the details (below) the processed cdt file is mentioned. But the CDT file (attached), doesn't contain update information about the specified object.
The sync doesn't work from then on.
CDT snippet:
…
<key>primaryKeys</key>
<array>
<string>p86</string>
<string>p4</string>
<string>p31</string>
</array>
…
Details:
2012-03-19 16:48:11.643 iVocabulary3[6826:41ef] -[_PFUbiquityRecordImportOperation processObjects:withState:andImportContext:outError:](658): CoreData: Ubiquity: Transaction log: <_PFUbiquityRecordImportOperation: 0xdaf2490>:
localPeerIID: mobile.12DFD3C2-603D-5D06-9263-674D4D4458C7
logScore: {
"mobile.12DFD3C2-603D-5D06-9263-674D4D4458C7" = 0;
"mobile.9DFEE1D5-C465-5D7C-B478-0C404DB164D8" = 1;
}
transactionLog: <PFUbiquityTransactionLog: 0xd9e4960>
transactionLogLocation: <PFUbiquityLocation: 0xdca36d0>: /private/var/mobile/Library/Mobile Documents/7UMMMKVNA9~de~chbeer~iVocabulary/iVocabularyTransactionLogs/83326B61-0501-4C8A-86C7-9BB9BC373BAC/mobile.9DFEE1D5-C465-5D7C-B478-0C404DB164D8/83326B61-0501-4C8A-86C7-9BB9BC373BAC/zy1ml5fqillJaXtar4n1H7nbvcVWAD~grfmwMlkr2vw=/202CC597-3E30-4E59-93B3-83A00BAD0B83.1.cdt
transactionNumber: 4
appears an updated object: x-coredata://F5416F77-6AE5-46FC-9F9E-D3AA4042A0BE/Word/p287 was deleted.
Steps to Reproduce:
Implement an app that syncs a Core Data data store via iCloud.
Expected Results:
Working synchronization.
Actual Results:
Broken synchronization.
Regression:
Notes:
19-Mar-2012 05:13 PM Christian Beer:
'202CC597-3E30-4E59-93B3-83A00BAD0B83.1.cdt.zip' was successfully uploaded
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
UIManagedDocument iCloud sync seems to be broken…
Core Data creates newly inserted objects with temporary IDs. It seems iCloud syncs those temporary IDs and the other device can't find the corresponding objects to fulfill relationships, etc.
There's a thread on StackOverflow with a nice solution: http://stackoverflow.com/questions/9437159/core-data-managed-object-does-not-see-related-objects-until-restart-simulator