My app is rejected from app store multiple times for not following 'iOS Data Storage Guidelines'. I have marked all document directories with "do not back up" attribute as suggested by apple review team, as shown:
- (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *) filePathString
{
NSURL* URL= [NSURL URLWithString:filePathString];
NSError *error = nil;
BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
forKey: NSURLIsExcludedFromBackupKey error: &error];
return success;
}
I have called the above addSkipBackupAttributeToItemAtPath
method for all NSDocumentDirectory as shown :
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
[self addSkipBackupAttributeToItemAtPath:[paths objectAtIndex:0]];
and review team says it is still storing some data as backup to iCloud and it is being rejected by Apple review team, actually i don't want anything to back up. Is there anything i have missed to Skip Backup Attribute? or anything wrong in my code? please help. Thank you.