how to create unique id in swift class code example Example: swift generate uuid let uuid = UUID().uuidString print(uuid)