如何使用 Xcode/Objective-C 生成唯一标识计算机的 UUID? Windows 有 UuidCreateSequential()
,我可以在 Mac 上使用什么?
最佳答案
试试这个:
CFUUIDRef UUID = CFUUIDCreate(kCFAllocatorDefault);
CFStringRef UUIDString = CFUUIDCreateString(kCFAllocatorDefault,UUID);
// UUIDString is the CFStringRef (== NSString *) that contains the UUID.
// Cleanup
CFRelease(UUID);
CFRelease(UUIDString);
关于objective-c - 在 Xcode 中生成计算机特定的 UUID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1984925/