Skip to content

Instantly share code, notes, and snippets.

@kelp404
Last active December 11, 2015 18:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kelp404/4639909 to your computer and use it in GitHub Desktop.
Save kelp404/4639909 to your computer and use it in GitHub Desktop.
Generat UUID String

##Generat UUID String ###Objective-C

CFUUIDRef uuid = CFUUIDCreate(NULL);
CFStringRef s = CFUUIDCreateString(NULL, uuid);
NSString *result = [NSString stringWithString:(__bridge NSString *)s];
CFRelease(s);
CFRelease(uuid);
// result = E15C95D5-609E-49DC-B893-2AC14F8F60A2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment