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

后端 未结 7 952
花落未央
花落未央 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:20

    Since 10.8 you could also use: NSString *uuidString = [[NSUUID UUID] UUIDString];

提交回复
热议问题