NSUUID* identifier = [[UIDevice currentDevice] identifierForVendor];
NSString* uniqueIdentifier = [identifier UUIDString];
This returns a unique identifier for the current device, that is unique to each app. Apple recommends using this for general purposes, and advertisingIdentifier
for purposes of advertising.
When implementing a system for serving advertisements, use the value
in the advertisingIdentifier property of the ASIdentifierManager class
instead of this property. Use of that property requires you to follow
the guidelines set forth in the class discussion for the proper use of
that identifier. For more information, see ASIdentifierManager Class
Reference.
... from here