I need the unique id of the device for login and I am using the following code.
NSString *str_udid=[[[UIDevice currentDevice] identifierForVendor] UUIDString];
But after uninstall the application new id is coming from old one.
You can save str_udid
object into the Keychain. Here is the link about how to do that: https://github.com/kishikawakatsumi/KeychainAccess
It will not remove even if you have deleted your application from the device.