I have an app that lets you download "modules" that can expand your app usage.
When the user downloads a module, I fetch a ZIP file from a server and extract it to his Caches folder. (Each of these zips could be sized anywhere from 60k to 2MB).
Unfortunately, there are over 300 modules available, and many of the users download at least 50-60 of these to their device.
Lately, I got many complaints that modules just disappear off the user device, so I did some investigation and came across the following wording in Apple's documentation.
iOS will delete your files from the Caches directory when necessary, so your app will need to degrade gracefully if it's data files are deleted.
And also the following article explaining further about this situation: http://iphoneincubator.com/blog/data-management/local-file-storage-in-ios-5
My problem is, I have no actual way of degrading gracefully, since I can't automatically let the user download so many modules. It could take hours depending on the internet connection and size of the modules.
So I have a few questions:
- Did any of you ever had to deal with a similar situation, and if yes, how?
- Does anyone know when exactly iOS purges the Cache? What is considered "low space" warning? This way I could at least give the user a warning that he doesnt have enough space to install a new module.
- Is there a way to receive some sort of warning before the Cache folder is cleared?
This is a really frustrating move from Apple and I don't really see a way out. Would really love to hear some ideas from you.