User1075
User1075

Reputation: 885

Vendor ID uniqueness among different devices for same application?

I have been using the identifierForVendor for creating unique identifier for my application. As per the document in :

identifierForVendor

It states that

"The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.

Normally, the vendor is determined by data provided by the App Store. If the app was not installed from the app store (such as enterprise apps and apps still in development), then a vendor identifier is calculated based on the app’s bundle ID. The bundle ID is assumed to be in reverse-DNS format."

This is the code in objective C

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

Below are my queries

A) Will the vendor ID for my application named "App_A" return the same vendor ID for different devices if installed from App Store? Or each device will have different vendorID for same application which is installed from AppStore?

B) Are there any chances of vendorID getting changed if i update the application with new version?

Any inputs is appreciated . Please help with the queries

Upvotes: 0

Views: 1532

Answers (1)

DonMag
DonMag

Reputation: 77477

  1. Unique ID per device.

  2. No, the Vendor ID will not change with version updates.


Edit

From Apple's docs here:

The value in this property remains the same while the app (or another app from the same vendor) is installed on the iOS device. 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.

That seems to pretty clearly answer your questions.

Upvotes: 3

Related Questions