It has just come to light that the UIDevice uniqueIdentifier property is deprecated in iOS 5 and unavailable in iOS 7 and above. No alternative method or pr
UIDevice identifierForVendor
introduced in iOS 6 would work for your purposes.
identifierForVendor
is an alphanumeric string that uniquely identifies a device to the app’s vendor. (read-only)
@property(nonatomic, readonly, retain) NSUUID *identifierForVendor
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 onthe same device that come from different vendors, and for apps on different devices regardles of vendor.
Available in iOS 6.0 and later and declared in UIDevice.h
For iOS 5 refer this link UIDevice-with-UniqueIdentifier-for-iOS-5