convert uuid string to uuid swift 5 code example Example: swift generate uuid let uuid = UUID().uuidString print(uuid)