Why isn't the master data saved to disk?

I have an application that uses basic data and writes successfully to disk regularly when data changes. For most users, this works absolutely fine.

However, one person found that they could use the application for several hours, and it was only when they closed the application and reopened it, did they find that nothing was saved.

There was no mistake, no glitches. The app is still fully usable. It just didn't save anything to disk.

When they continued to use the app, the same thing happened, it wouldn't save anything on disk. The problem was actually resolved (no code changes) when this person simply rebooted their phone.

I'm wondering if this could be a disk space issue? The app is about 170 MB on their phone and they have ~ 300 MB of free space.

I am open to any suggestions here. Personally, I would rather crash the application than let someone keep using it for hours without realizing that nothing is being saved to disk.

I am using magic notation to implement basic data.

I used MR_saveToPersistentStoreAndWait

and now I have switched to MR_saveToPersistentStoreAndWaitWithError

. But I don't even know what to check for this as I have no idea what caused the error.

+3


source to share


1 answer


Although I can't be sure I reproduced the issue on the user's device by reporting the issue. I was able to reproduce a scenario in which my application will continue to function but not save anything to disk.

I did this by manually creating an entity that did not follow the validation rules of the Entity model.



When the context tried to save, it would spit out an error, but the application continued to function as if there was no problem.

+3


source







All Articles