Skip to content

Instantly share code, notes, and snippets.

@virasio
Created March 6, 2014 07:07
Show Gist options
  • Save virasio/9383952 to your computer and use it in GitHub Desktop.
Save virasio/9383952 to your computer and use it in GitHub Desktop.
UUID Generator (Objective-C)
+ (NSString*)getUUID
{
CFUUIDRef newUniqueId = CFUUIDCreate(kCFAllocatorDefault);
NSString * uuidString = (__bridge_transfer NSString*)CFUUIDCreateString(kCFAllocatorDefault, newUniqueId);
CFRelease(newUniqueId);
return uuidString;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment