1

I need to be sure I am doing the right thing:

In my app the user can download audio files from the server. I don't want those big file to be backed up as he can re download them when ever he needs to.

My app is addressed for iOS 4.0 and above.

So as I understand I need to store the files is the documents directory and set a flag for the directory to not back up ?

Am I correct ?

Martin Kenny
  • 2,468
  • 1
  • 19
  • 16
shannoga
  • 19,649
  • 20
  • 104
  • 169

2 Answers2

2

Instead of putting them into the "Documents" directory (which gets backed up to the cloud), why not put your audio files into a "Cache" directory (specifically "/Library/Cache", which does not get backed up)?

Here's another question here on Stackoverflow that may help give a further answer to your question.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • Won't those files be deleted when I empty the cache of the app ? – shannoga Jul 07 '12 at 19:40
  • Yes... if you don't want to use "Cache", then set the "Do not backup" flag on whichever directory you decide to use (as specified in [this answer](http://stackoverflow.com/a/8145650/981049)). The big issue here though is that this flag is 5.1 & newer only – Michael Dautermann Jul 07 '12 at 20:51
  • What about the temp directory? – shannoga Jul 08 '12 at 09:08
0

You can also prevent files to backed up: https://developer.apple.com/library/ios/qa/qa1719/_index.html