I have created a function to get UUID
func deviceUUID() -> String {
return UIDevice.currentDevice().identifierForVendor?.UUIDString ?? ""
}
But the problem is that when ever I uninstall the app from same device and re-install it. I am getting a totally new UUIDString. If this the default behaviour then can I get previous UUID somehow ? because I have UUID as user ID in our server.
I do have a solution in my mind but I do not know that will it work or not so please guide me on this.
Lets say I get the ID first time and save it in keychains. When user reinstall the app I get the ID from keychains. Is this possible ?