Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
324 views
in Technique[技术] by (71.8m points)

ios - Where we have to store download data in iPhone application?

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...