티스토리 뷰
UUID - Universally Unique Identifire ( 시간, 공간을 이용하여 뽑아낸 128bit (중복되지 않는) 값 )
GUID - Globaly Unique Identifire ( UUID 와 같은 MS 에서 사용하는 값 )
UDID - Unique Device Identifire ( 기기 별 고유 식별 값 )
NSString* uniqueIdentifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; // IOS 6+
NSLog(@"UDID:: %@", uniqueIdentifier);
보안상의 이유로 udid 수집이 ios6부터 사라졌다
+ (NSString *)deviceUUID
{
if([[NSUserDefaults standardUserDefaults] objectForKey:[[NSBundle mainBundle] bundleIdentifier]])
return [[NSUserDefaults standardUserDefaults] objectForKey:[[NSBundle mainBundle] bundleIdentifier]];
@autoreleasepool {
CFUUIDRef uuidReference = CFUUIDCreate(nil);
CFStringRef stringReference = CFUUIDCreateString(nil, uuidReference);
NSString *uuidString = (__bridge NSString *)(stringReference);
[[NSUserDefaults standardUserDefaults] setObject:uuidString forKey:[[NSBundle mainBundle] bundleIdentifier]];
[[NSUserDefaults standardUserDefaults] synchronize];
CFRelease(uuidReference);
CFRelease(stringReference);
return uuidString;
}
}
위에건 다른방법인데 논ARC ㅡㅡ...
UDID 를 얻고자 한다면 오픈 소스를 사용한다 아래 소스가 유명한듯
ylechelle/OpenUDID
[OpenUDID IS NOW DEPRECATED] Open source initiative for a universal and persistent UDID solution for iOS
github.com
https://github.com/ylechelle/OpenUDID
ylechelle/OpenUDID
[OpenUDID IS NOW DEPRECATED] Open source initiative for a universal and persistent UDID solution for iOS - ylechelle/OpenUDID
github.com
+ 이사하면서 본건데,, uuid 로 가져오거나 유틸을 이용해서 udid를 가져올 수 있고
IDFA(애플 광고서비스) 를 사용하는 앱인 경우에는 ADID로 사용자를 구분하면 된다!
참고로 안드로이드나 구글 서비스를 이용하는 경우에는 GAID 가 있으니 (Google Advertising ID) 그걸 참고하면 될듯하다!
'study - iOS' 카테고리의 다른 글
ios 8.0 이상 처리해야할 것들 (0) | 2019.04.21 |
---|---|
[ios] ios에서 singleton 생성하기 (0) | 2019.04.21 |
[공유] [iOS] Dropbox를 이용한 Enterprise(In-House) App 배포하기 (0) | 2019.04.21 |
iOS11 UIPageViewController error 해결 (0) | 2019.04.21 |
How To Make iOS CarPlay App (0) | 2019.04.21 |
- Total
- Today
- Yesterday
- RxSwift
- uuid
- ios
- 세계시간
- ADID
- iOS비콘
- Instance
- Singleton
- ios #DRM #Media #codec #swift #audio #fairplay #widevine #playready
- UDID
- iOS #앱개발
- 백그라운드
- DeviceID
- backgroundTask
- TimeZone
- 반응형프로그래밍
- 앱개발
- GAID
- iBeacon
- 비콘
- Swift
- xcode
- CarPlay
- Beacon
- RECO
- IDFA
- UIPageViewController
- SVG
- 카플레이
- 파일변환
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |