My application was rejected because it seems that 7 mb are stored in a folder with documents, and they are automatically sent to icloud. Therefore, I looped through all the files that will be written to the document folder through this method:
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL {
const char* filePath = [[URL path] fileSystemRepresentation];
const char* attrName = "com.apple.MobileBackup";
if (&NSURLIsExcludedFromBackupKey == nil) {
u_int8_t attrValue = 1;
int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
return result == 0;
}
else {
int result = getxattr(filePath, attrName, NULL, sizeof(u_int8_t), 0, 0);
if (result != -1) {
int removeResult = removexattr(filePath, attrName, 0);
if (removeResult == 0) {
NSLog(@"Removed extended attribute on file %@", URL);
}
}
NSError *error = nil;
[URL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:&error];
return error == nil;
}
1.1 . 1.2 ( , , , addSkipBackupAttributeToItemAtURL). . temp cache, ( - db, db ), , , , :
[self addSkipBackupAttributeToItemAtURL: [NSURL fileURLWithPath: fullPath]];
[NSURL fileURLWithPath: fullPath] ios 5.1, , . nsurl [NSURL URLWithString: defaultStorePath], 5.1, , .
ios 5.0.1 , [NSURL URLWithString: defaultStorePath] , [NSURL fileURLWithPath: fullPath].
, ios nsurl, - . :
, , / 7mb. , :
, 7 mb nsurl ( ). ? - ? - , apple, ?