I have some problems during the work with CoreData and iCloud. I have used example from apple developer forum (iCloud) - IPhoneCoreDataRecipes project that represents the work with CoreData through the iCloud. It works fine but there appear some conflicts and not all entities are synchronising.
I can see the following warnings in the log:
Warning>: +[PFUbiquityRecordImportConflict createTransactionLogForTransactionEntry:withError:](607): CoreData: Ubiquity: Unable to find transaction log for entry: <PFUbiquityTransactionEntry: 0x68b9a60> (entity: PFUbiquityTransactionEntry; id: 0x68c5d50 <x-coredata://697F667C-7541-43E7-B21B-5362D165537B/PFUbiquityTransactionEntry/p2> ; data: {
actingPeer = "0x1526e0 <x-coredata://697F667C-7541-43E7-B21B-5362D165537B/PFUbiquityPeer/p1>";
globalIDStr = "com.appmania.dreambookdata.coredata:DreamHistory:p1:mobile.99829CE6-D497-590F-B2F8-795CFFC84CCB";
knowledgeVectorString = "mobile.99829CE6-D497-590F-B2F8-795CFFC84CCB:1";
localIDStr = "x-coredata://D45E85ED-A2B7-48AC-96BF-6B2C64812656/DreamHistory/p1";
storeMetadata = "0x12d4a0 <x-coredata://697F667C-7541-43E7-B21B-5362D165537B/PFUbiquityStoreMetadata/p1>";
transactionDate = "2011-12-01 08:00:13 +0000";
transactionLogFilename = "7C9AD5E3-457E-4E2B-8F1C-A7D8878E5BDB.1.cdt";
transactionNumber = 1;
transactionTypeNum = 0;
})
Does someone know how such conflicts can be resolved? Thank you.
It is recommended that you specify a merge policy on your managed object context:
moc.mergePolicy = [[NSMergePolicy alloc]
initWithMergeType:NSMergeByPropertyObjectTrumpMergePolicyType];
There are also other merge policies, choose the one which fits your application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With