uuidgen
uuid_generate(uuid_t uu),
// Create universally unique identifier (object)
CFUUIDRef uuidObject = CFUUIDCreate(kCFAllocatorDefault);
// Get the string representation of CFUUID object.
NSString *uuidStr = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuidObject);
CFRelease(uuidObject);
本文介绍了两种创建通用唯一标识符(UUID)的方法:一种是通过uuidgen命令行工具;另一种是使用Core Foundation框架中的CFUUIDCreate函数来创建CFUUIDRef对象,并通过CFUUIDCreateString函数将其转换为字符串形式。
1326

被折叠的 条评论
为什么被折叠?



