The project I am on is requesting two (or even three) unique identifiers from the iPhone or iPad. I know, I know... the UDID should be enough but we are trying to see if there are any other unique identifiers that we can use.
I can get the IMEI, serial number, MAC Address, etc. from the phone using the IOKit.framework but apparently this is frowned upon by Apple and any app using this framework will be rejected.
Does anyone have any other ideas, or identifiers that I am missing that could be used?
Thanks!
Your UDID can be found in Finder. In the Finder sidebar, choose your iPhone, then click area in the header just under your phone's name until you can see the UDID. Then, right click and choose Copy UDID.
No They are not same. And UDID is hidden number to use for device testing its a unique key that is stored in apple database.
From Apple:
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.
So if you use [UIDevice identifierForVendor]
and the user delete the app and reinstall it, the id will be different(so no real physical device tracking)
Why don't you use SecureUDID
?
NSString *domain = @"com.example.app";
NSString *key = @"mykey";
NSString *udid = [SecureUDID UDIDForDomain:domain usingKey:key];
This way, even if the user delete the app and reinstall it, the UDID will be same. This will give you consistent tracking(or whatever you want to do with the UDID). Btw, the above is still permitted from Apple. Have fun.
DeviceCheck API in iOS 11 is an interesting solution to get unique Identifier, the advantage it has is - the value will be retained even after the app in uninstalled. So use cases like trial installation and rewards can be effectively controlled by developers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With