Time-based UUID (version 1) on iOS?

2019-05-29 04:56发布

问题:

How can we create a RFC 4122 complaint UUID (version 1, time-based) with iOS?

回答1:

Here's the man page of the underlying library used by CFUUID and NSUUID. It contains the time based creation function:

#include <uuid/uuid.h>

uuid_generate_time(uuid_t);

It's contained in iOS as well.



标签: ios uuid