Souf R Souf R - 7 months ago 137
Swift Question

iOS app rejected: Apps must follow the iOS Data Storage Guidelines or they will be rejected

My application got rejected for the 2nd time.

When my app got rejected for the 1st time, I first checked all these links and more:



Then, I added a function that marks all my
/Documents
files with "do not back up" attribute
NSURLIsExcludedFromBackupKey
. But my application got rejected again. Here is my code:

func excludeUrls(path: String) {
let urlToExclude = NSURL.fileURLWithPath(path)
do {
try urlToExclude.setResourceValue(NSNumber(bool: true), forKey: NSURLIsExcludedFromBackupKey)
print("\(path) excluded.")
} catch {
print("failed to set resource value")
}
}


More informations:


  • I have about 320 static photo embedded in
    Supporting Files
    , these images are not backed up.

  • I use
    Google/SignIn
    ,
    Google/CloudMessaging
    ,
    Alamofire
    and
    SQLite.swift
    pods

  • I have 1 sqlite database that I save in /Library/Cache folder, which is not backed up of course.

  • When I check iCloud storage space for my application:


    Go to Settings > iCloud > Storage & Backup > Manage Storage



I found that my app stores ONLY 578 KB
enter image description here

Answer

Hopefuly, Apple Review Team finished by accepting my application. Here is what I did:

1 - I moved the generated database to the /Library/Caches

2 - I added an ImageLoader class to optimise the way i'm loading and using images inside the app, specially, there is a lot of images to handle. So, best way is to use cache: check this class

3 - The most important thing that I did, after seeing that my app does not store a lot of KB in iCloud, is that I appealed the rejection and I gave a lot of description and details and even some screenshots.

Comments