I'm trying to generate random code mixed of numbers (0-9) and letters(A-z) so I can send it to user email to use it when login .
Is there a library or any way to do this ?
I'm trying to generate random code mixed of numbers (0-9) and letters(A-z) so I can send it to user email to use it when login .
Is there a library or any way to do this ?
This is give random value...
func returnUUIDWithTimeStamp() -> String {
return UUID().uuidString + NSString(format: "%f", Date().timeIntervalSince1970 * 1000).substring(with: NSRange(location: 8, length: 5))
}
Result will contain '-'
C95B920A-3866-4A50-A783-D719FB0B607512830