-
UUID (Universally Unique Identifier): A sequence of 128 bits that can guarantee uniqueness across space and time, defined by RFC 4122.
-
GUID (Globally Unique Identifier): Microsoft's implementation of the UUID specification; often used interchangeably with UUID.
-
UDID _(Unique Device Identifier)): A sequence of 40 hexadecimal characters that uniquely identify an iOS device (the device's Social Security Number, if you will). This value can be retrieved through iTunes, or found using UIDevice -uniqueIdentifier. Derived from hardware details like MAC address.
Yes. UDID is deprecated in iOS 5.
identifierForVendor and advertisingIdentifier.
identifierForVendor is an same UUID for all the 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.
A vendor is defined by the first two parts of the reverse DNS formatted CFBundleIdentifier. For example, com.2359media.app1
and com.2359media.app2
would have the same identifierForVendor
. But my.hungrygowhere.iphoneapp
and com.2359media.hgwm
would get a different identifierForVendor
.
NSString *vendorID = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
NO. identifierForVendor 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.
advertisingIdentifier is an UUID for each device, used only for serving advertisement. Unlike the identifierForVendor, the same value is returned to all vendors.
NSString *adID = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
No. advertisingIdentifier remains the same value until:
- The user does a full system reset (Settings.app -> General -> Reset -> Reset All Content and Settings)
- The User explicitly resets it (Settings.app -> Privacy -> Advertising -> Reset Advertising Identifier)
According to Apple's guide, the section about "What is a Vendor?" is slightly incorrect. It would be true for apps not installed from the App Store. However, apps installed from the App Store do not rely on the bundle identifier to determine which vendor they are from.
Reference: https://developer.apple.com/reference/uikit/uidevice/1620059-identifierforvendor