Where should we store download data in the iPhone app?

I am working on an in-app purchase and upload the data after payment in the users / Documents folder. Apple rejected my application, stating that you are not following the iOS Data Storage guide.

Can someone help me implement iCloud features in my application?

thanks

+7
source share
2 answers

According to the iOS Storage Guide , you should probably store your acquired data inside Application_Home / Library / Caches >. The downloaded data does not belong to the Documents folder.

Apple provides a list of different directories and what you should tag in the File System Programming Guide . The most important is:

  • 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 should not be saved between starts of your application.

As a rule, this means that everything that is not intended for viewing by the user must enter the directory inside the library directory. Typically, you would use one of them, but in the File System Programming Guide

+19
source

The answer is listed in the iOS Storage Guide, but it has flaws. It clearly states that the Documents directory is reserved for user-created content and that the Cache directory is for content that can be downloaded again or regenerated. It is also possible that the size of these factors in their approval. This answers your question, but ignores the fact that the user may need to reload your data; discuss your case and submit your feedback, but be prepared to change the download destination directory to the Caches directory.

IOS Storage Guides: http://developer.apple.com/icloud/documentation/data-storage/

You also requested information about iCloud features ... the data store and the iCloud API are two different things. Read here: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW1

+4
source

All Articles