Macos Mac OS UUID是否依赖于硬盘?

Macos Mac OS UUID是否依赖于硬盘?,macos,uuid,hard-drive,Macos,Uuid,Hard Drive,我使用此代码在Mac OS上获取UUID NSString* getComputerId() { io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/"); CFStringRef uuidCf = (CFStringRef) IORegistryEntryCreateCFProperty(ioRegistryRoot, CFSTR(kI

我使用此代码在Mac OS上获取UUID

NSString* getComputerId()
{   
    io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/");
    CFStringRef uuidCf = (CFStringRef) IORegistryEntryCreateCFProperty(ioRegistryRoot, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0);
    IOObjectRelease(ioRegistryRoot);
    return (NSString*) uuidCf;
}

此UUID是否依赖于硬盘?如果用户更换硬盘,UUID会发生变化吗?

中没有提到HDD