UUID could be changed ??

Hi ,


I just got uuid by the code below.


UIDevice.current.identifierForVendor!.uuidString


And, when I test this app, there is some bug report that could be occured when uuid is suddenly changed.


Using above code in not safe ? UUID should NOT to be changed..


Thanks 🙂


ps. UUID could be changed by updating OS version ?

there is explain in API doc ., Device's

identifierForVendor
is 'An alphanumeric string that uniquely identifies a device to the app’s vendor.'..

what is app's vendor exactly means ? bundle id ?

Accepted Reply

This thread has been deleted

Right - network device ID varies depending on network/radio used.


The topic of using UUID to ID users is an old one - search here and see the MTL links below.


But you may need to further detail why you need it, beyond just to ID users...perhaps talk about what the app does, etc.

Replies

You do realize that multiple UUIDs can reported for one device, depending on interface/network device, right? BT is different from Wi-Fi, as an example.


Perhaps if you explained why you need it...

I can't comment on your Swift code but 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.

I got it Thanks so much 🙂