Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS App Documents directory being dropped

In my iOS app I am saving data in the documents directory, and it is all being flagged to NOT sync to the cloud as Apple suggests.

The issue I am having is every once in a while my app's documents directory is being deleted, which results in a loss of the user's data. I am having trouble finding when this happens, as it is rare and there is no one thing that is causing the issue.

I initially assumed the folder grew too large, so the OS just dropped the folder, but Apple does not state any size limit or anything for the documents directory, at least not that I could find.

Has anyone had a similar issue or does anyone have any info that should shed some light on my issue?

Thanks

EDIT:

The issue has just come up again, and here is a screenshot of my apps documents with no documents directory, it was just deleted:

enter image description here

Xcode also keeps spitting out this message after it happened every few seconds:

Error: Failed end transaction from database 'cannot commit - no transaction is active'

like image 591
RyanG Avatar asked Mar 09 '12 18:03

RyanG


1 Answers

Are you sure it's the document directory? Please check that. This is a known situation with Caches and tmp directories as reported here.

like image 179
fbernardo Avatar answered Oct 21 '22 02:10

fbernardo