generate uuid for each instance struct swift code example Example: swift generate uuid let uuid = UUID().uuidString print(uuid)