It's not guaranteed to be unique. It's just a randomly generated number.
why not simply use the phone number including country code of the device, every phone number when preceded by the country code is unique.
You mean ask user to enter their phone number? How is that an improvement?
I’m wondering how the device identifier in the iOS app is generated. How is it ensured that it is unique?