Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app rejected "2.23 Apps must follow the iOS Data Storage Guidelines" #26

Open
alexkemp opened this issue Jun 3, 2012 · 5 comments
Open

Comments

@alexkemp
Copy link

alexkemp commented Jun 3, 2012

I implemented the SQLitePlugin and my app got rejected because Apple says it didn't follow the iOS Data Storage Guidelines, mainly I think because the database is stored in the Documents folder.

I followed their technical page and included a "do not backup attribute" so the data don't get backed up by iCloud:

/**

  • do not backup attribute
    */
    • (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL

{

assert([[NSFileManager defaultManager] fileExistsAtPath: @"myDatabase.sqlite3"]);



NSError *error = nil;

BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]

                              forKey: NSURLIsExcludedFromBackupKey error: &error];

if(!success){

    NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);

}

return success;

}

/**

  • end do not backup attribute
    */

I resubmitted the app and still got rejected with the same reason (with no further details).

Have folks encountered this issue and how to resolve?
Appreciate any advice as I'm pressing to get this app submitted.

xcode 4.3.2
PhoneGap v1.4.1

@davibe
Copy link
Owner

davibe commented Jun 18, 2012

Can't you just use a different folder instead of documents ?

Could you paste the apple response ?

I use the plugin for applications that do not have to be happroved since they are distributed in ad-hoc mode (enterprise deployment).

@tsathish
Copy link

tsathish commented Aug 2, 2012

Alex, hope you would have got your app approved. I too have a similar issue, could you throw some light on the solution you had?

Thanks.

Sathish

@alex-swiftify
Copy link

alexkemp, tsathish: Could you please share your experience on getting your app(s) approved?
I'm in the same shoes right now - going to do the first submit to AppStore.
I'd rather keep my SQLitePlugin database in the Documents folder and set a "do not backup" attribute,
but due to your experience I may rather want to change the database location to <Application_Home>/Library/Caches.

Note: my database contains both pre-populated and user generated data, which is important.
I do not want anything backed up in iCloud for some reasons.

@tsathish
Copy link

Crulex, I store the the support files for the application in the NSApplicationSupportDirectory, as mentioned in the link http://developer.apple.com/library/ios/#qa/qa1719/_index.html. The link has source code to exclude content from back-up for multiple versions. I did store my files only in the application support directory irrespective of the version (5.0 0r 5.1). I submitted by app 2 weeks ago and got it approved last week. After seeing your comment, It just struck me that I missed the check of iOS versions to choose between Library/Caches and ApplicationSupport directories based on the OS version. May be you should take care of it before you submit your app. All the best!
Additional info on the App folders available at http://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html.

@alex-swiftify
Copy link

tsathish: thanks for pointing out to using Application Support directory!
We're targeting IOS 6 only at least with our first submitting to AppStore, but I still have few concerns.

Our database contains both pre-populated and user generated data.
Currently it's saved to the Documents folder and iPad displays the amount of iCloud storage used by our app as 4 MB.
Now I think I should store by SQLitePlugin database in Application Support directory and apply the com.apple.MobileBackup extended attribute to them, but I have the following concerns:

  1. According to Apple guidelines on https://developer.apple.com/library/ios/qa/qa1719/_index.html :
    Important: Apps should avoid mingling app data and user data in the same file. Doing so will unnecessarily increase backup sizes and can be considered a violation of the iOS Data Storage Guidelines.
    Since we have a HTML5 / JavaScript application with a single database, and most of the data is user-generated,
    I see no easy possibility to split the database into user-generated and pre-populated content.
    Do you think this may cause my app to be rejected?
  2. I read the following in https://issues.apache.org/jira/browse/CB-1561 :
    The iOS Data Storage Guidelines indicate that only content that the user creates using your app, e.g., documents, new files, edits, etc., should be backed up by iCloud.
    Also:
    Every data generated by the user must be backup by iCloud.
    Thus the question - won't Apple reject our app for not backing up important and user generated data into iCloud?

I'd be thankful for your suggestion(s) regarding what approach will minimize the chance for our app to be rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants