Created
February 12, 2013 21:08
-
-
Save sugendran/4773412 to your computer and use it in GitHub Desktop.
CREATE UUID in Objective-C with ARC
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
// CREATE UUID in Objective-C with ARC | |
NSString* createUUID() | |
{ | |
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); | |
CFStringRef uuidStr = CFUUIDCreateString(kCFAllocatorDefault, uuid); | |
NSString *result = [NSString stringWithString:(__bridge NSString*)uuidStr]; | |
CFRelease(uuid); | |
CFRelease(uuidStr); | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment