8

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

2
  • We need a bit more information. How much are you downloading? Did Apple tell you more specifically which guideline was breached/ Nov 1, 2011 at 7:50
  • iOS Data Storage guideline was breached. Nov 1, 2011 at 9:33

2 Answers 2

21

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.

1
  • Thanks I will try this one if it's working or not working I will update you. Thank you Nov 1, 2011 at 11:37
4

The answer is spelled out in the iOS Data Storage Guidelines, but it has downsides. It says clearly that the Documents directory is reserved for user-created content, and that the Caches directory is for content that can be downloaded again or regenerated. It's possible also that the size of the data factors into their approval. That answers your question, but it ignores the fact that it can be a burden for the user to re-download your data; argue your case and submit your feedback, but be prepared to change your download destination directory to the Caches directory.

iOS Data Storage Guidelines: http://developer.apple.com/icloud/documentation/data-storage/

You also asked for info on iCloud functionality... data storage and iCloud APIs 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

2
  • Thanks I will try this one if it's working or not working I will update you. Thank you Nov 1, 2011 at 11:37
  • 1
    Here's a good post on someone's practical experience with the iOS5 storage cleaning behavior:marco.org/2011/10/13/ios5-caches-cleaning
    – jd.
    Nov 2, 2011 at 4:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.