Created
September 26, 2012 13:53
-
-
Save jdriscoll/3788187 to your computer and use it in GitHub Desktop.
NSString+UUID
This file contains hidden or 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
#import "NSString+UUID.h" | |
@implementation NSString (UUID) | |
+ (NSString *)UUIDString | |
{ | |
CFUUIDRef UUID = CFUUIDCreate(NULL); | |
CFStringRef string = CFUUIDCreateString(NULL, UUID); | |
CFRelease(UUID); | |
return (__bridge_transfer NSString *)string; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment