Develop
2016.05.13 11:17
[ios] UUID 생성 + Key Chain 연동
조회 수 10202 댓글 0
첨부 '2' |
---|
UUID 쉽게 사용하기 ㅋㅋ
KeychainItemWrapper.h/m 파일은 업로드된 것을 사용해도 되고 아래 URL에 있는 내용을 사용해도 됨.
(어차피 업로드 된 것도 저거 다운 받아서 업로드 한거니.. ㅋㅋ)
# KeychainItemWrapper.h 파일
# KeychainItemWrapper.m 파일
#import "KeychainItemWrapper.h" - (NSString *)getDeviceUUID { KeychainItemWrapper *keychainItemWrapper = [[KeychainItemWrapper alloc] initWithIdentifier:@"UUID-Identifier" accessGroup:nil]; NSString *uuidString = [keychainItemWrapper objectForKey:(__bridge id)(kSecAttrAccount)]; if (uuidString == nil || [uuidString length] == 0) { // if there is not UUID in keychain, make UUID and save it. CFUUIDRef uuidRef = CFUUIDCreate(NULL); CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef); CFRelease(uuidRef); uuidString = [NSString stringWithString:(__bridge NSString *)uuidStringRef]; CFRelease(uuidStringRef); // save UUID in keychain [keychainItemWrapper setObject:uuidString forKey:(__bridge id)(kSecAttrAccount)]; } return uuidString; }
TAG •
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
1093 | Develop | [js] 키보드 아스키코드(ASCII) 코드보기 | hooni | 2003.04.23 | 33417 |
1092 | System/OS | [linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd | hooni | 2003.04.23 | 33293 |
1091 | System/OS | [linux] 특정 문자열 포함된 파일 찾는 명령어 | hooni | 2013.10.16 | 33093 |
1090 | Etc |
성문 종합 영어 정리된 pdf 파일
![]() |
hooni | 2013.06.25 | 33037 |
1089 | Develop | [ios] 소소한 팁 (Rect,Point,Path,URL 등) | hooni | 2013.08.08 | 32650 |
1088 | Develop |
[python] DJI Tello 드론 코딩 (프로그래밍)
58 ![]() |
hooni | 2018.03.04 | 32611 |
1087 | Develop | [ios] 개발 기초 가이드 링크.. | hooni | 2013.04.23 | 32333 |
1086 | Etc | 영작 연습을 위한 실용영어 문장 1001개 (1~500) | hooni | 2013.06.21 | 32069 |
1085 | Develop |
[js] jQuery 관련 문서 ㅎㅎ
![]() |
hooni | 2013.04.23 | 32005 |
1084 | Develop | 서기의 PHP 동영상 강의(싱싱해) | hooni | 2013.05.15 | 31901 |
1083 | System/OS | [sql] insert into select 사용하기 | hooni | 2013.04.23 | 31878 |
1082 | System/OS |
맥북에서 MAC/윈도우 멀티부팅시 시간 설정
![]() |
hooni | 2013.04.23 | 31265 |