Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where we have to store download data in iPhone application?

Tags:

ios

iphone

icloud

I am working on In-App-Purchase and downloading data after payment in users /Documents folder. Apple has rejected my application it's says you are not following iOS Data Storage guideline.

Can any one help me how to implement iCloud functionality in my application?

Thank you

like image 337
Nitesh Meshram Avatar asked Nov 01 '11 07:11

Nitesh Meshram


1 Answers

According to the iOS Data Storage Guidelines you should probably be storing your purchased data inside the Application_Home/Library/Caches directory. The downloaded data does not belong in the Documents folder.

Apple provides a list of the various directories and what you should put in those in the File System Programming Guide. The most important includes:

  • Application_Home/Documents/ Use this directory to store user documents and application data files.
  • Application_Home/Library/ This directory is the top-level directory for files that are not user data files.
  • Application_Home/tmp/ Use this directory to write temporary files that do not need to persist between launches of your application.

Generally this means that anything that is not intended to be seen by the user should go into a directory inside the Library directory. Typically you would use one of these, but there is a larger list with more specialized uses in the File System Programming Guide:

  • Application Support: Use this directory to store all application data files except those associated with the user’s documents.
  • Caches: Use this directory to write any application-specific support files that your application can recreate easily

The Application Support folder is backed up but the Caches is not.

like image 119
Claus Broch Avatar answered Sep 23 '22 21:09

Claus Broch