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!
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.
This question is old however a new unique, vendor based, identifier has now been added to replace the deprecated UUID in iOS 6.
The
[UIDevice identifierForVendor]
should now be used instead of[UIDevice uniqueIdentifier]
which is now deprecated as of iOS 5.0Example usage:
The method for getting the UDID is being deprecated, you should now use
CFUUIDCreate
which I think could be used multiple times to get more identifiers if neededYou can get the ICCID and the IMSI (if they exist).
I think that's as far as you will get. I don't know any other options for getting an universal ID.
Perhaps you should clarify your question.
…is a contradiction in terms. If your purpose is to track a specific physical device, then a single unique identifier, by definition, is enough. That’s what unique means.
Perhaps, what you really want is to track multiple things about each user’s use of your app, as opposed to the device. Say your networked game app allows the user 1, 2, or 3 different personalities. As they user creates a distinct personality, you must track each of that user's personalities amongst all the other user’s personalities.
For this kind of purpose, generating and storing a UUID* is a proper and common solution. iOS includes libraries to generate a UUID value. The only catch is that if the user deletes and re-installs the app, the storage of that UUID may be lost. There are workarounds for this challenge, which you may learn about by googling for discussions of replacing UDID tracking with generated UUID values.
This question is a bit older. So I should mention: In iOS 5, Apple deprecated the use of the UDID. As of 2013-05-01 Apple is rejecting any app that accesses the UDID.
(*) Do not confuse a UUID with a UDID. UUID is a standard 128-bit (32 hex digits) number often used as a virtually unique identifier in many technology scenarios. UDID is Apple's 40 hex digit string burned into every iOS device to uniquely identify each device.
From Apple:
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
?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.