Skip to main content
lordalexworks
Participant
June 4, 2012
Question

App rejected due to localStorage issue, seeking advice.

  • June 4, 2012
  • 3 replies
  • 14027 views

Hello everyone, Apple has rejected our application because we store files for offline viewing  under localStorage (/Documents)

This is an extract of the message, we received :

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.

How can we do this with Adobe Air using Flex SDK 4.6?

+LA

This topic has been closed for replies.

3 replies

Participant
February 7, 2013

is there any solution new?

i tried all of them, but not work. why don't adobe work about it?

i make ios application with flash cs6 air but apple reject me becouse of "do not back up". i spent a lot of time for make this app. please help.

Participating Frequently
February 8, 2013

With AIR 3.6 latest prerelease,

A new property, preventBackup is introduced in the File API, which when set prevents a file or a folder from getting backed up on the iCloud. This property works on iOS 5.1 devices and later.

Another static property, File.cacheDirectory has been added, which points to the <APPLICATION_HOME>/Library/Caches directory on iOS devices, and files in this directory are not backed up.


You can find additional details on this feature here<http://labsdownload.adobe.com/pub/labs/flashruntimes/shared/air3-6_fla shplayer11-6_releasenotes.pdf>

Participant
February 9, 2013

how can we use preventBackup, to make File.documentsDirectory to make do not back up?

can u give example?

Adobe Employee
June 5, 2012

Please go through the following blos post http://blogs.adobe.com/airodynamics/2012/03/05/app-compliance-with-apple-data-storage-guidelines/ to find details about apple storage guidelines. I agree there is no way to set the donot back up attribute but as a work around you can store the images in the caches directory instead of the Documents directory since these files are can be recreated/downloaded again.

Inspiring
June 6, 2012

Thanks for your reply. The problem is with data you never want purged such as files stored for offline viewing. Users do not want offline files to be automatically removed without any prior notice, even in low space conditions, because they want to access that content while there's no connection. That's the reason to use the DoNotBackup native API.

However, the article you link talks about "Application Support Directory" and says it's never purged under low memory conditions. This is the first time I hear about such a directory. The iOS Data Storage Guidelines never mention this:

https://developer.apple.com/icloud/documentation/data-storage/

So what's this directory and how do we access it?

Adobe Employee
June 6, 2012

You can find more details about Application Support Directory in http://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html. Also, use File.applicationStorageDirectory to store files in Application Support Directory.

Inspiring
June 4, 2012

Believe it or not, Adobe has not made anything about this, and there are no plans to do so, either, so we have to rely in a third party (not developed by Adobe) native extension to set this attribute:

http://www.jampot.ie/ane/ane-ios-data-storage-set-donotbackup-attribute-for-ios5-native-extension/

I think this should be natively implemented, since it's a requirement from Apple, not optional, maybe in the form of an attribute change method. If you agree, please vote here: https://bugbase.adobe.com/index.cfm?event=bug&id=3104319