As you know, getting a unique ID in iOS devices is banned by Apple. But sometimes we need to identify devices, for example, got bonus when the app first installed with the only once user. We don't want to sign(earn the bonus) multiple users in one device.
So, we got vendorID from the device and save this data on a keychain(vendorID changed the time by time, but we don't want to changingID). After that, we check this data is available on a keychain. I read this thread [iOS autodelete Keychain items after uninstall][1] that related keychain data will be removed after the app deleted.
But when I try this scenario. My keychain data don't delete and keychain data persistent after deleting.
So my question is raized from this point. Anyone know about this issue? After my app deleted, keychain data will be persisted or removed all keychain data.
Keychain data will delete after uninstall?
To look at my keychain data saving function.
class func getUniqueDeviceID() -> String {
guard let uniqueDeviceId = KeychainKeeper.shared.uniqueDeviceID else {
let deviceId = (UIDevice.current.identifierForVendor?.uuidString)~
KeychainKeeper.shared.uniqueDeviceID = deviceId
return deviceId
}
return uniqueDeviceId
}
Please do not offer other solutions. We are stuck in this scenario. We want to sure after the deleting app keychain will be deleting or not [1]: https://forums.developer.apple.com/thread/36442
ANSWER :
Keychain data always persist now.