0

I download some data and save it to Library/PrivateDocuments directory. every file i download in this- Library/PrivateDocuments directory i set "do not backup" attribute. and apple still says :

"In particular, we found that on launch and/or content download, your app stores too much data (10.3 MB after app launch) in the incorrect location. To check how much data your app is storing:


Temporary files used by your app should only be stored in the /tmp directory; please remember to delete the files stored in this location when the user exits the app."

p.s i need that files to stay there.. at first i check for files and if some of them doesn't exists i download them. so they aren't temp files and i don't want to delete them.. and i don't know what to do.. if you are familiar with this problem please give me a hint.. thanks.

Kara
  • 6,115
  • 16
  • 50
  • 57
kjhkjhkjh
  • 412
  • 3
  • 12
  • 1
    Maybe this helps you out: http://stackoverflow.com/a/7963969/5228 – Mariusz Sep 11 '12 at 11:49
  • I just posted a QnA on the how and where for saving persistent data in iOS: http://stackoverflow.com/q/12371321/1633251 This is more current than the previous link's recommendations. – David H Sep 11 '12 at 14:02

2 Answers2

2

I use NSCachesDirectory (Library/Caches) and never got problems with apple.

Jonathan Cichon
  • 4,396
  • 16
  • 19
  • when i save to Caches directory don't i need to delete data after user exists app? – kjhkjhkjh Sep 11 '12 at 11:57
  • 1
    caches folder can be deleted on iOS 5.0.1 and up – jcesarmobile Sep 11 '12 at 11:58
  • 1
    No, the Caches directory can be deleted by the user manually. The Temp dictionary should be delete after/during the user exits the app. The Caches directory is for all data your app needs but can recreate if it doesnt exist anymore (all Data not created by the user, but by the developer) – Jonathan Cichon Sep 11 '12 at 12:01
0

Change the app to NOT create the temporary data stuff for like 5 minutes or something. Apple testers don't spend that much time in the App so they will miss this.

Toad
  • 1