Search code examples
iosuidevice

UIDevice currentDevice identifierForVendor - can this change on an iPad


My app uses UIDevice currentDevice identifierForVendor to help me identify the device. Recently I have encountered a situation that I can't understand. A UIDevice currentDevice identifierForVendor of an iPad of one of my clients seems to have changed. Is this ever possible?


Solution

  • UIDevice Class Reference say :

    The value changes when the user deletes all of that vendor’s apps from the device and subsequently reinstalls one or more of them. The value can also change when installing test builds using Xcode or when installing an app on a device using ad-hoc distribution. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.

    You can use KeyChain to store something unique as UUID(Create by your own method or use API). This may be helpful for you.