In my iOS Swift app I want to generate random UUID (GUID) strings for use as a table key, and this snippet appears to work:
let uuid = CFUU
Each time the same will be generated:
if let uuid = UIDevice.current.identifierForVendor?.uuidString { print(uuid) }
Each time a new one will be generated:
let uuid = UUID().uuidString print(uuid)