Downloadable content under iOs

Hello!

I have a question about storing downloadable content under iOS 6.0 and higher.


Where should I store content of about 300 MBytes? According to this article:

https://developer.apple.com/icloud/documentation/data-storage/index.html

it should be stored in the <Application_Home>/Library/Caches


This article:

https://developer.apple.com/library/mac/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW1

tells that /Caches directory may be cleared by OS in some situations, which is not desirable for us. The article advises to store downloadable content in <Application_Home>/Library/Application Support

It's not clear enough, is this directory automatically backed up to iCloud, which is also not desirable because of big data size.


So, which variant is better?

Actually, neither one is right for you. /Caches is no good because of the periodic erasing, but /Application Support isn't good either because its contents are indeed backed up to iTunes or iCloud (but it's not part of the iCloud container mechanism). That second article you linked explicitly says that you shouldn't put anything downloadable in Application Support because it takes up extra space in the backup (and besides, it can always be re-downloaded).


Instead, as the article recommends, just create a custom directory within Library (maybe "/Downloaded Content" or something like that) and put your stuff there. It won't be wiped accidentally, and it won't be needlessly backed up.

Thanks for your reply.


Are you sure custom subfolders in /Library are not backed up by iCloud? The first article says (in the very begining):

"Everything in your app’s home directory is backed up, with the exception of the application bundle itself, the caches directory, and temp directory."

Downloadable content under iOs
 
 
Q