티스토리 뷰
출처
https://developer.apple.com/library/content/qa/qa1719/_index.html
https://stackoverflow.com/questions/14376883/is-nsurlisexcludedfrombackupkey-recursive
iCloud Backup 막기
막는 방법으로는 filePath 로부터 NSURL 객체를 가져와
"NSURLIsExcludedFromBackupKey" 속성값을 YES 로 지정해주면 된다.
NSError *attributedError = nil;
BOOL isSuccess = [url setResourceValue:[NSNumber numberWithBool:YES]
forKey:NSURLIsExcludedFromBackupKey
error:&attributedError];
상위 폴더에 적용했다면 Recursive 하게 적용되는가?
위 attribute 를 적용하는 당시에 존재하던 파일들은
모두 NSURLIsExcludedFromBackupKey 속성값을 YES 로 가진다.
하지만 새로 생성되는 파일들은 상위 폴더의 속성값을 가지지 못한다.
속성값을 확인하는 방법은 아래와 같다.
id attribute = nil;
NSError *error = nil;
[url getResourceValue:&attribute
forKey:NSURLIsExcludedFromBackupKey error:&error];
'iOS 개발 > iOS' 카테고리의 다른 글
[iOS] CALayer 의 개념 (CATextLayer, CAShapeLayer, CAGradientLayer) (0) | 2017.07.16 |
---|---|
[iOS] KeyChain 의 Key (SecKeyRef) 를 NSData 형식으로 변경하기 (0) | 2017.06.22 |
[iOS] NSURLSession 에 대한 이해 (0) | 2017.05.23 |
[iOS] dispatch_group_notify 의 사용법 (0) | 2017.04.28 |
dispatch_queue 의 sync, async 와 Thread 의 관계 (1) | 2017.02.23 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- dictionary
- workerThread
- Swift 3.0
- UIView
- Swift 3
- docker
- ios
- Swift
- thread
- delegate
- CIImage
- coredata
- Swift3
- set
- 읽기 좋은 코드가 좋은 코드다
- Swfit
- AWS
- CGImage
- string
- applicationWillResignActive
- NSManagedObjectContext
- 꺼내먹어요
- optional
- HTTP
- Block
- NSManagedObjectModel
- RunLoop
- Arc
- EffectiveObjectiveC
- NSManagedObject
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함