[iOS]아이폰 DOCUMETN 안에 파일들 Icloud 맊기..(안맊음 리젝 당함)

· 2013-01-17 (목) 16:15:06 · 4669

- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL

{

    if (&NSURLIsExcludedFromBackupKey == nil) { // iOS <= 5.0.1

        const char* filePath = [[URL path] fileSystemRepresentation];

        //        NSLog(@"Ios  --> 5.0.1 이하!");

        const char* attrName = "com.apple.MobileBackup";

        u_int8_t attrValue = 1;

        

        int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);

        return result == 0;

    } else { // iOS >= 5.1

        //        NSLog(@"Ios  --> 5.1 이상!");

        

        NSError *error = nil;

        [URL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:&error];

        return error == nil;

    }

}

추가해주시고요~ 

파일명 경로를 저 함수대로 넣어서 쓰시면 됩니다.~

저거 안하면 리젝 당해서 ㅠㅠ 이렇게 공유하고자 올립니다 .^^ 

|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
Mobile 13-01-18 조회 6,574
Mobile 13-01-18 조회 6,039
PHP 13-01-18 조회 5,808
PHP 13-01-18 조회 6,290
PHP 13-01-18 조회 3,176
기타 13-01-18 조회 3,029
PHP 13-01-18 조회 6,321
Mobile 13-01-17 조회 4,016
MySQL 13-01-17 조회 3,142
Mobile 13-01-17 조회 4,670
PHP 13-01-17 조회 3,953
PHP 13-01-17 조회 2,414
JavaScript 13-01-17 조회 3,150
PHP 13-01-17 조회 3,093
PHP 13-01-17 조회 3,971
JavaScript 13-01-16 조회 4,110
OS 13-01-15 조회 6,982
Mobile 13-01-14 조회 5,294
MySQL 13-01-11 조회 4,069
jQuery 13-01-09 조회 8,555
JavaScript 13-01-08 조회 3,798
jQuery 13-01-07 조회 5,114
jQuery 13-01-07 조회 3,515
jQuery 13-01-04 조회 1.5만
Mobile 13-01-03 조회 1.4만
jQuery 13-01-03 조회 1.8만
기타 13-01-02 조회 1.1만
기타 13-01-01 조회 1.9만
MySQL 13-01-01 조회 7,793
jQuery 12-12-31 조회 6,682