iOS UUID (Universally Unique Identifier) Identifier for vendor

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9


iOS 6

Within a single line, we can get an UUID like below:


let UDIDString = UIDevice.currentDevice().identifierForVendor?.UUIDString


NSString *UDIDString = [[[UIDevice currentDevice] identifierForVendor] UUIDString];

The identifierForVendor is an unique identifier that stays the same for every app of a single vendor on a single device, unless all of the vendor's apps are deleted from this device. See Apple's documentation about when this UUID changes.

Got any iOS Question?