3

I have reports from a handful of users of my production app that data has disappeared. My app has been in development/production for over 2 years now and I have never observed this data loss or have been able to reproduce it.

Here is the information I have:

  1. My app stores all of its data using core data

  2. I have iCloud/Core Data sync enabled. The sync is not working at all, but that is a separate issue all together.

  3. There is no mechanism in my app that deletes data without explicit permission from the user.

  4. One user described the data loss occurring after reopening the app after a crash. Could the fact the fact the data went missing after the app closed imply that the context isn't saving?

My hunch is that this is either some weird issue with iCloud/Core Data sync (see this) or my app on rare occasion does not save the context.

Regarding the saving, I should say that in 2 years of developing/testing the app I have never observed a save error. I should also point out that I do use the NSMergePolicy NSMergeByPropertyObjectTrumpMergePolicy for my context. I understand that the presence of a conflict without a merge policy can lead to save errors.

What are some potential causes for this data loss?

Community
  • 1
  • 1
ChemDev
  • 827
  • 1
  • 8
  • 23
  • Is the problem that **all** data has been lost, or that recent changes have been lost? – Tom Harrington Nov 09 '15 at 18:15
  • The problem is not that all data ha been lost. It appears that recent changes have been lost. Would you say this suggests some sort of save error? – ChemDev Nov 11 '15 at 02:11

0 Answers0