Downloadable content and the base directories

We have made a game with downloadable content, we download some zip files into the system.TemporaryDirectory, and extract all content to system.CachesDirectory for later use. The thing is, this directory is pretty limited since as is stated in Apples File System Programming Guide:

On iOS 5.0 and later, the system may delete the Caches directory on rare occasions when the system is very low on disk space. 

Due to the same deletion issue, system.TemporaryDirectory does not fulfill our needs. We do not want the user to tamper with the files, and it is against Apple’s guidelines to store downloaded content in the documents folder, so the system.DocumentsDirectory is out of the equation:

Use this directory to store user-generated content. The contents of this directory can be made available to the user through file sharing; therefore, his directory should only contain files that you may wish to expose to the user.

We know we could always use the disable icloud feature but that wouldn’t stop the file sharing tampering.

What we need access to is the “Application Support” folder, and as it says in the File System Programming Guide:

A game might use this directory to store new levels purchased by the user and downloaded from a server.

The game is working and in the app store right now, and some users are facing deletion of the cache folder (As expected), and users have to download/extract all files all over again, using data and time, so we need to fix this as soon as possible.

What we are thinking on doing is intercept all calls that use filepaths, change the baseDir to system.CachesDirectory (Since it is on the Library folder, as the Application Support) and add a “…/Application Support/” to access the Library folder and then the Application Support folder. Will come back with results soon, but, it would be nice to have a system.ApplicationSupport folder. Are there any plans for this? Has anyone worked their way around with downloadable content before?

Can you put in a feature request for this at https://feedback.coronalabs.com

???

Thanks

Rob

Thanks Rob, Sure, the feature request is here. I’m about to complete some tests with the workaround and see if it works.

EDIT:

The workaround does not work for the zip plugin. i would need to manually copy all files to the Application Support folder, after extracting them.

Have you found a working solution to using downloadable content? We’re looking into similar issue with our game

We have been waiting. The feature is still under review. Hopefully it will be accepted as the other options for downloadable content are a bit risky in my opinion. (Risky as files can be deleted at any time by iOS, and have to be re-downloaded)

Can you put in a feature request for this at https://feedback.coronalabs.com

???

Thanks

Rob

Thanks Rob, Sure, the feature request is here. I’m about to complete some tests with the workaround and see if it works.

EDIT:

The workaround does not work for the zip plugin. i would need to manually copy all files to the Application Support folder, after extracting them.

Have you found a working solution to using downloadable content? We’re looking into similar issue with our game

We have been waiting. The feature is still under review. Hopefully it will be accepted as the other options for downloadable content are a bit risky in my opinion. (Risky as files can be deleted at any time by iOS, and have to be re-downloaded)