Created
January 17, 2011 09:58
-
-
Save amudi/782673 to your computer and use it in GitHub Desktop.
[iOS] return UDID as NSString
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
+ (NSString *)UDIDString { | |
NSString *udid = (NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, | |
(CFStringRef)[[UIDevice currentDevice] uniqueIdentifier], | |
NULL, | |
(CFStringRef)@" !*'();:@&=+$,/?%#[]", | |
kCFStringEncodingUTF8); | |
return [udid autorelease]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment