Generate a UUID string with ARC enabled
Looks fine to me. This is what I use (available as a gist) – (NSString *)uuidString { // Returns a UUID CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); NSString *uuidString = (__bridge_transfer NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid); CFRelease(uuid); return uuidString; } Edited to add If you are on OS X 10.8 or iOS 6 you can use the new NSUUID … Read more