Check out example codes for "swift generate uuid". It will help you in understanding the concepts better.

Code Example 1

let uuid = UUID().uuidString
print(uuid)

Learn ReactJs, React Native from akashmittal.com