ios - CloudKit Sync : Core Data Stack Suggestions -


we need sync data cloud kit our application , maintain local cache of data using core-data. best approach core-data stack ?

current setup:

main context (main-moc)(main queue) :- used display data main ui , perform edit user.

child context (has main-moc parent) (private queue) :- used process data cloud (insert, update, delete)

problem :

child context :

  1. create duplicates
  2. overwrite main context updates
  3. deletes parent entity value in use child entity. happens when parent entity object(a) deleted in child context, , main moc adds child(b) parent while sync in progress, time sync finishes , child context saved deletes parent object(a) , child object(b) left without parent.

do need check such objects after sync finishes , add parent them ? other suggestions


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -