Does UUID getting changed for some cases
Asked Answered
F

2

14

I am using user's device UUID to get unique device.

NSString  *currentUUIDString = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

I know that UUID getting changed if the app gets deleted/reinstalls (Apple document).

But Does UUID getting changed for following cases?

  1. If app has been updated. (Found same question)
  2. If the device OS version has been upgraded.
  3. If do iCloud/iTunes backup and restore.
  4. If the device has been reset. (In this case, I think UUID Keychain storage will not work. Keychain storage also getting cleared I guess.)

Edit:

No, This is not duplicate, that question is related to how to identify the device uniquely and I have already followed. I know that we can use UUID to identify device uniquely. But my concern is what are the frequencies that UUID might get changed and if changed then what are the scenarios in which it can be changed.

Familiarity answered 29/6, 2015 at 12:33 Comment(7)
1,2,4 it's not changes, but number 3 it changes. Check my answer [here][1]. [1]: https://mcmap.net/q/902289/-how-to-identify-ios-device-uniquely-instead-of-using-uuid-and-udid-duplicateFeatured
possible duplicate of How to identify iOS device uniquely instead of using UUID and UDIDFeatured
@gyer Thanks for your comment. It is not duplicate, that question is related to how to identify the device uniquely. But this question is related to the frequency of change in UUID and scenarios in which it can be changed.Familiarity
Why not test it out and see what happens? Updating the app, or doing a restore from iTunes is the same as doing a reinstall. If device being reset you mean factory reset, then yes. If you mean turning the device off then on, then no. But the best way in this scenario is just to test yourself.Selfeducated
@Jeff Thanks for your comment. Whatever possible from my side I have already done with it. But above cases like iTunes/iCloud back up/restore, OS upgrade or factory reset is not possible to do from my side. If anyone has already done with it, then that will be easy to go ahead.Familiarity
Factory reset is guaranteed to change the vendor ID because the app needs to be reinstalled afterwards.Selfeducated
stackoverflow said too much 'duplicate' .. I also get those warn often even if questions are not duplicated.. stackoverflow should fix this ..Noontide
C
4

Yes

The device's identifierForVendor is an excellent way of identifying the device. It will change if the app (and all apps from the same developer) is removed from the device and reinstalled. It does not depend on wifi/Bluetooth connections. With the exception of a bug last year, it does not change with operating systems. ...... You could also write your own UUID to the keychain - that survives delete/reinstall of the app...You could also write something to the user's iCloud key-value file. That would be user-specific rather than device-specific. It also survives delete/reinstall. I think that is what you want.

Carolynecarolynn answered 16/4, 2018 at 10:11 Comment(0)
G
0

It does not get changed until and unless you delete and install the application again.

Gertrudegertrudis answered 5/10, 2020 at 8:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.