I just read through this link about ios file system. However, I still unable to decide how to properly store files in my app.
My app basically does the following.
display all sorts of files from the net. (docx, pdf, video, images, etc)
user can choose to save offline for the above files.
From the link, I think I have 3 directory choices.
Documents/ (recommended for user-generated or cannot be downloaded)
tmp/ (after done with files, should be deleted)
Library/caches (system will delete, but caches store longer than tmp)
So, my questions are,
- where should I put if the user choose to save offline?
- where should I put if the user decided not to save offline?
I am using
UIDocumentInteractionController
Also, I am a bit confused between cashes and tmp.
It would be nice if you can provide me sample code or link to tutorial blogs. Thanks!