누

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

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

- (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,404건

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

+
분류 제목 글쓴이 날짜 조회
Mobile 13-01-18 조회 3,695
Mobile 13-01-18 조회 6,622
Mobile 13-01-18 조회 6,088
PHP 13-01-18 조회 5,848
PHP 13-01-18 조회 6,335
PHP 13-01-18 조회 3,224
기타 13-01-18 조회 3,077
PHP 13-01-18 조회 6,372
Mobile 13-01-17 조회 4,054
MySQL 13-01-17 조회 3,179
Mobile 13-01-17 조회 4,708
PHP 13-01-17 조회 3,987
PHP 13-01-17 조회 2,451
JavaScript 13-01-17 조회 3,186
PHP 13-01-17 조회 3,134
PHP 13-01-17 조회 4,005
JavaScript 13-01-16 조회 4,157
OS 13-01-15 조회 7,021
Mobile 13-01-14 조회 5,350
MySQL 13-01-11 조회 4,103
jQuery 13-01-09 조회 8,599
JavaScript 13-01-08 조회 3,827
jQuery 13-01-07 조회 5,147
jQuery 13-01-07 조회 3,553
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,836