When does the iPad empty the library / caches?

In response to Apple's changes to the storage rules for iOS, I recently reconfigured the iPad application to store its documents (50 MB +) in the library / caches folder.

During testing in the iOS simulator, I did not see any problems with this cache when I simulated the update (the next Brad Larsson suggestion). I also tried deleting the entire contents of the library / caches folder to make sure my application can recover.

However, when I released the application update, I found that my users complained about problems that were ported to the iPad, partially removing this cache. It looks like the subfolder structure has been at least partially left untouched, but the contents of the subfolders have been deleted.

I updated the application to deal with this situation during the update, but I'm worried about what happens when the iPad decides to clear the library / caches.

Does anyone have any experience or understanding of how the iPad will try to delete items in this cache?

thanks

+7
source share
2 answers

There is no 100% clear answer to this question, because the iples storage guidelines for iOS iples are very vague ... They do not explain in which cases iOS 5 deletes data inside the dir cache ...

In most cases, iOS starts killing files when it gets low on disk, but sometimes my application lost data for no good reason. Thus, I really implemented some kind of recovery method for downloading / generating files needed by applications.

This article is interesting: http://iphoneincubator.com/blog/data-management/local-file-storage-in-ios-5

+5
source

The documentation indicates the following:

In iOS 5.0 and later, the system can delete the Caches directory on, in rare cases, when the system is at a very low level on disk. This will never happen while the application is running. However, you should be aware that iTunes Recovery is not necessarily the only condition under which the Cache Directory can be deleted.

Part of this does not happen while the application is running, is critical to our application and is really good insurance that we will not get unexpected behavior.

+1
source

All Articles