Is there a method to generate a standard 128bit GUID (UUID) on the Mac?

后端 未结 7 917
花落未央
花落未央 2020-12-23 21:31

Is there a built in function equivalent to .NET\'s

Guid.NewGuid();

in Cocoa?

My desire is to produce a string along the lines of

相关标签:
7条回答
  • 2020-12-23 22:33

    UUIDs are handled in Core Foundation, by the CFUUID library. The function you are looking for is CFUUIDCreate.

    FYI for further searches: these are most commonly known as UUIDs, the term GUID isn't used very often outside of the Microsoft world. You might have more luck with that search term.

    0 讨论(0)
提交回复
热议问题