Inquisitive Cocoa

Unless otherwise stated all code is released under the MIT License

Entries from May, ‘09:

Everyone seems to have their own version of a unique identifier generator. Here’s mine:

+ (NSString *)uuid {
	uuid_t buffer;
	uuid_generate(buffer);
 
	char string[37];
	uuid_unparse_lower(buffer, string);
 
	return [NSString stringWithFormat:@"%s", string];
}

And remember to add #include <uuid/uuid.h>

Cocoa, Objective-C, SourceAdd your thoughts

Categories & Tags:
By Date: