Search code examples
iosobjective-ciphonexcodeuuid

Unusual case of VENDOR IDENTIFIER getting same in different devices for same app downloaded from App Store


recently I got into iOS development and I got a task of examining the application which is already in App Store . But I found something unusual ... Two different users when loging through two different devices through my application which is downloaded from App Store returns same vendor ID ...... is this the expected one ? Because according to the APPLE DOCUMENTS VENDOR ID MUST BE DIFFERENT FOR DIFFERENT DEVICE REGARDLESS OF VENDOR if the app is downloaded from App Store . Please clarify here .

The code which I am using is :

NSString *UString = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
NSLog(@"Vendor ID %@", UString);

Solution

  • After several research and practical results I found several characteristic of VendorID:

    1. VENDOR ID will be unique for every device I.e if a same app is downloaded on two devices from App Store , it will surely return different VENDOR ID. VENDOR ID is calculated based on AppStore data in this case

    2. VENDOR ID will be same for every app on a single device which is from same vendor . That is if I have 5 apps from a VENDOR named A in my device .. ALL THESE 5 APPS WILL HAVE SAME VENDOR ID. If we uninstall one app and reinstall again the VENDOR ID will not change . For VENDOR ID to change we must uninstall all 5 apps .

    3. VENDOR ID in newer iOS will also change if we are installing the build using XCODE or development certificate on different device I.e every device will have a different VENDOR ID for same app . In this case vendor ID is calculated based on BUNDLE ID . For older iOS similar BUNDLE ID for 2 apps may produce identical VENDOR ID .

    4. VENDOR ID is always a 32 bit string

    5. VENDOR ID is not a device identifier instead it’s a UUID through this we can’t identify the details about the device

    UPDATION CASE

    It is not supposed to change when updating the app from app store as is described in the documentation.

    If you are updating an itunes-installed app, then updating it using Xcode or an ipa based on ad hoc provisioning or any provisioning, you will get a different value. You need to make it consistent, Adhoc to adhoc, dev to dev, app store to app store.

    Installing and Reinstalling app when the vendor has only single app

    Unless the user has another app from the same vendor installed, this id will change after deleting and reinstalling. In your case, where there is no other app by the same vendor, this means that the ID will change,