简体   繁体   中英

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:

在此处输入图片说明

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'

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM