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 :
- create duplicates
- overwrite main context updates
- 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
Post a Comment