Tom Fox
Tom Fox

Reputation: 905

Swift and Firebase | How precise is the .timestamp(), can I use it as an identification?

I am making a quiz game for iOS and I need a way to identify which game is which. Can I use the .timestamp() or is there a chance that two games could end up with the same timestamp value?

Upvotes: 0

Views: 159

Answers (1)

Tom Fox
Tom Fox

Reputation: 905

A better way to create identifiers, as suggested by @RMenke is to use NSUIID().UUIDString...

For example

let uuid = NSUUID().UUIDString
print(uuid)

Upvotes: 2

Related Questions