Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
CREATE UUID in Objective-C with ARC
// 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];
return result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment