I am running different apps with same API in same device. But different UUID going to server. How can I send same UUID both apps with same device and API. how can I resolve this. I want same UUID in same Device with different apps.
Different UUI's are here:- 1: 0D0B5F8F-9D4D-44E6-ACA2-DF9DA634FA53 2: 738927AD-C795-4C4C-9D41-AB0FCD7357E1
let imei = UIDevice.current.identifierForVendor?.uuidString
Print(imei)
Here're some useful excerpts from identifierForVendor documentation:
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.
For example, given bundle ID com.example.app.app1
, on iOS 7.x+
com.example.app
will be used to calculate vendor ID (omitting only the last component). Since you're probably targeting iOS 7+, please make sure that your apps' bundle identifiers differ in the last component only.
The value in this property 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.