Reputation: 922
Today while investigating how/where to download and save audio/image files from a URL in a project I am working on, I stumbled upon a potential app rejection possibility if we save large audio/image files in the documents directory in iOS.
The issue here is related to 'iOS Data Storage Guidelines' published over here https://developer.apple.com/icloud/documentation/data-storage/ - "Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application should be stored in the '/Documents' Directory and will be automatically backed up by iCloud."
On further reading, I found that many people had their apps rejected because of storing too much data in the documents directory (since a user has a limited amount of 5GB in his iCloud account) and the documents directory for all apps on a users device is automatically backed up to iCloud.
An option given to developers is to store data in the '/Library/Caches' directory. However data present in caches directory can be deleted anytime the OS is low on memory and there is no guarantee that the data will be present always which is not an acceptable solution to our project since we cannot expect our app's user base to download large files more than once.
The solution which I found according to this link http://developer.apple.com/library/ios/#qa/qa1719/_index.html#//apple_ref/doc/uid/DTS40011342 is to specifically mark the files you store in Documents directory for not being backed up and the process is described therein. However, it is only applicable from iOS 5.0.1 onwards. It is not possible to exclude data from backups on iOS 5.0 and below.
So, my question over here is: 'Since the project I am working on has a sufficiently large number of images/audio to be stored and re-downloading them is not an option , would it be advisable to support installations only on iOS 5.0.1 and above because of the above mentioned issue or keep backward compatibility with iOS 4.3 and investigate other ways to store the data without the app being rejected? Approximately what percentage of users do we stand to lose if we go with the former approach? Are there any statistics for the same?'
Please let me know your thoughts on this
Upvotes: 1
Views: 587
Reputation: 1640
Prior to iOS 5 the /Library/Caches directory isn't cleared by iOS. The Do Not Backup feature was added to iOS 5.0.1 because the new cache clearing in 5.0 broke a lot of apps, such as instapaper - see Marco Arment's blog post on this issue: http://www.marco.org/2011/10/13/ios5-caches-cleaning
Maybe you can use /Library/Caches for those users below ios 5.0.1 and move over to using the Do Not Backup marker after they upgrade.
Upvotes: 1
Reputation: 44856
Several things:
References:
Upvotes: 1