Domanda

I have developed one app in which, monthly magazine issues are downloaded and stored inside the app Document directory.

But app have rejected app due to storing of magazine issue in document directory. My magazine file size is around 50 MB.

They mentioned below:

The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., may be stored in the /Documents directory - and backed up by iCloud.

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.

Data that can be recreated but must persist for proper functioning of your app - or because customers expect it to be available for offline use - should be marked with the "do not back up" attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCFURLIsExcludedFromBackupKey attribute.

Any help appreciate.

Thanks.

È stato utile?

Soluzione

Move your files to the Caches directory and you should be good to go.

Altri suggerimenti

I believe that if it is user generated content, there is no problem with storing it on the /Documents folder.

Since it is content that can be downloaded again, you have to set the NSURLIsExcludedFromBackupKey file attribute which prevents it from being backed up to iCloud.

Take a look at this question on setting the attribute: Use NSURLIsExcludedFromBackupKey without crashing on iOS 5.0

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top