Notice
Recent Posts
Recent Comments
- Today
- Total
내 머릿속 데이터베이스
아이폰의 UUID 가져오기 본문
아이폰에는 고유한 Unique Identifer이 있다.
줄여서 UUID라고 부르며 대략 숫자와 영문이 섞인 40자리 문자열이다
(void)applicationDidFinishLaunching:(UIApplication *)application {
NSString* strId = [[UIDevice currentDevice] uniqueIdentifier];
UILabel *label = [[UILabel alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
[label setFont:[UIFont systemFontOfSize:12.0f]];
[label setTextAlignment:UITextAlignmentCenter];
[label setText:strId];
[window addSubview:label];
[label release];
[window makeKeyAndVisible];
}
Comments