skip to Main Content

We have observed the wired observation. We are generating UUID from below API

guard let identifierForVendor = UIDevice.current.identifierForVendor else { return "" }

after generating we are storing in Keychain and Coredata while retrieving the UUID 2nd time we are getting from coredata. for few scenarion we have observed that 2 different UUID for the same Device. Can any one have face this issue or observed such kind of behaviour in iOS.

2

Answers


  1. Yes, UUID can change. If the user deletes the app and all other apps created by the app vendor in that case the identifierForVendor can change.
    In one other case it can change is if it was not installed from the App Store and then later is. For example, you give the client an ad-hoc build to test and then later they install the app from the App Store

    Login or Signup to reply.
  2. According to Apple’s documentation

    … The value can also change when installing test builds using Xcode …

    I am not sure how you detect or "debug" that the value has changed, but if you run the app multiple times through Xcode I assume this is what could differ from your previous persisted value.

    As a last statement in the same documentation Apple states

    Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search