아이폰의 장치에는 일명 UUID라는 이름의 식별자를 가지고 있습니다. 대략 숫자와 영문이 섞인 40자리 문자열입니다.
이를 가져와서 뿌리는 방법은 다음과 같습니다.
[code]- (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];
}[/code]
위와 같이 간단하게 한줄로 UUID 값을 얻어올 수 있습니다. 너무 쉬웠나요? ^^a
![사용자 삽입 이미지](http://theeye.pe.kr/wp-content/uploads/1/1210455194.png)