Created
June 26, 2012 08:27
-
-
Save piaoapiao/2994377 to your computer and use it in GitHub Desktop.
deviceUID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIDevice *device = [UIDevice currentDevice];//创建设备对象 | |
NSString *deviceUID = [[NSString alloc] initWithString:[device uniqueIdentifier]]; | |
NSLog(@"%@",deviceUID); // 输出设备id | |
CFUUIDRef udid = CFUUIDCreate(NULL); | |
NSString *udidString = (NSString *) CFUUIDCreateString(NULL, udid); | |
NSLog(@"%@",udidString); | |
http://www.cocoachina.com/appstore/top/2012/0326/4092.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment