//iCloud 막을 Document경로 설정
NSString *documentPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES) lastObject];
NSURL *pathURL= [NSURL fileURLWithPath:documentPath];
NSLog(@"%@",documentPath);
if([[[UIDevice currentDevice] systemVersion] floatValue] > 5.0f){
[self addSkipBackupAttributeToItemAtURL:pathURL];
}else{
NSLog(@"CANNOT - CUZ VERSION IS UNDER 5.0.1");
}
//Cloud Data 백업 방지...
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
const char* filePath = [[URL path] fileSystemRepresentation];
const char* attrName = "com.apple.MobileBackup";
u_int8_t attrValue = 1;
int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
return result == 0;
}