My app was rejected by Apple because they said it doesn't follow the "iOS Data Storage Guidelines."
I have updated the app with the following code to flag downloaded content so that it isn't backed up to the cloud...
- (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *)filePathString {
NSURL *fileURL = [NSURL fileURLWithPath:filePathString];
NSLog(@"Going to add skip attribute to " @"%@", filePathString);
assert([[NSFileManager defaultManager] fileExistsAtPath: [fileURL path]]);
NSError *error = nil;
BOOL success = [fileURL setResourceValue:[NSNumber numberWithBool: YES]
forKey: NSURLIsExcludedFromBackupKey
error: &error];
NSLog(@"Added skip attribute to " @"%@", filePathString);
return success;
}
However, when I check Settings -> General -> Usage -> MyApp, it displays "Documents and Data" as > 30Mb. This is correct from the point of view that 30Mb of content has been downloaded to the app, but does this also mean that these 30Mb will be backed up to the cloud?
Put in another way, if I flag files so they are not to be backed up, would they be included or excluded from the "Documents and Data" value?
Cheers!