Created
July 16, 2012 22:39
-
-
Save jagbolanos/3125548 to your computer and use it in GitHub Desktop.
Create Unique ID
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*) getUniqueID { | |
CFUUIDRef newUniqueId = CFUUIDCreate(kCFAllocatorDefault); | |
CFStringRef newUniqueIdString = CFUUIDCreateString(kCFAllocatorDefault, newUniqueId); | |
NSString *uniqueId = [NSString stringWithFormat:@"%@",(NSString *)newUniqueIdString]; | |
CFRelease(newUniqueId); | |
CFRelease(newUniqueIdString); | |
return [[uniqueId retain] autorelease]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment