I have one product that has two different applications. and both the applications it gives me different Identifiers for the same device (you would assume that apple would associate this to maybe your developer account so that you can reuse the information across your applications), but I was wondering is their anything that would give me the same identifier for a device on both the applications?
2 Answers
identifierForVendor
is really what you want. UDID is a big NO on the AppStore. A user can opt out to advertisingIdentifier
. Other ways (by MAC address, like ODIN1, and solutions that rely on UIPasteboard, as OpenUDID) will break on the future (hint: 7).
According to the docs, you should have the same identifier if both apps are from the same developer:
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 on the same device that come from different vendors, and for apps on different devices regardless of vendor.
The value of this property may be nil if the app is running in the background, before the user has unlocked the device the first time after the device has been restarted. If the value is nil, wait and get the value again later.
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. Therefore, if your app stores the value of this property anywhere, you should gracefully handle situations where the identifier changes.
-
Marcelo but the issue with identifierForVendor is that it changes for both of my applications. I want something that is device and vendor specific so that I can reuse it within all the applications that are associated to my developer account – Jonathan Aug 12 '13 at 17:32
-
It shouldn't change. If you're positive that you're using the same account to sign both apps, you should file a radar. – Marcelo Aug 12 '13 at 17:39
-
oh! okay well I will report it to apple – Jonathan Aug 12 '13 at 17:41
-
I'm also about to file a radar because I've now seen 10 instances of my identifierForVendor changing without app deletion or system restore. I also have multiple applications signed with the same profiles and have the same com.companyname bundle ID structure, and that doesn't prevent it from changing. This problem is showing up on my Enterprise Distribution apps, not sure about App Store distribution. – Bek Dec 19 '13 at 15:34
-
If you use enterprise distribution Your identificarion number is generated trom MAC address – rado Mar 25 '14 at 19:30
OpenUDID is the best solution until now, even if it also may be changed if the device is reset.

- 1,575
- 16
- 23