Skip to content

Instantly share code, notes, and snippets.

@jaredsinclair
Created November 3, 2014 13:56
Show Gist options
  • Save jaredsinclair/f0ded712fca9699b18f5 to your computer and use it in GitHub Desktop.
Save jaredsinclair/f0ded712fca9699b18f5 to your computer and use it in GitHub Desktop.
NSString+UUID
+ (NSString*)stringWithNewUUID {
CFUUIDRef uuidObj = CFUUIDCreate(nil);
NSString *newUUID = (__bridge_transfer NSString*)CFUUIDCreateString(nil, uuidObj);
CFRelease(uuidObj);
return newUUID;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment