NSString *identifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString];
The code above gives two different identifiers on the same phon
The vendor is not determined by the team ID, but by either:
This varies depending on whether the device is running iOS 6 or 7+.
According to the -[UIDevice identifierForVendor] documentation:
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.
On iOS 6, the first two components of the bundle ID are used to generate the vendor ID. if the bundle ID only has a single component, then the entire bundle ID is used.
On IOS 7, all components of the bundle except for the last component are used to generate the vendor ID. If the bundle ID only has a single component, then the entire bundle ID is used.