I am getting the current device ID of an iPhone by using the below code:
let deviceId: String = (UIDevice.current.identifierForVendor?.uuidString)!
...but when I delete the app from the same phone its ID is changing. Why?
The device ID has to be changed when I install the app in other devices.
How do I do that? Please help me with code.
That's the way Apple designed it to work. From the documentation: