Skip to content

Instantly share code, notes, and snippets.

@kristopherjohnson
Created April 30, 2012 15:40
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 kristopherjohnson/2559409 to your computer and use it in GitHub Desktop.
Save kristopherjohnson/2559409 to your computer and use it in GitHub Desktop.
Create a new UUID string, ARC-compatible
+ (NSString *)makeNewUUIDString {
CFUUIDRef uuid = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, uuid);
CFRelease(uuid);
return (__bridge_transfer NSString *)(string);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment