Phaniteja
Phaniteja

Reputation: 131

iOS hardware parameters for unique id generation

Hi I would like to generate an unique id for an iOS device using any of the device hardware parameters. I do not want to use the MAC address because there is a chance that the MAC address can also be changed. So can you please let me know if there is any other unique hardware parameter with which I can generate an unique ID.

Upvotes: 3

Views: 671

Answers (1)

CrimsonDiego
CrimsonDiego

Reputation: 3616

I believe something along the lines of this is the generally accepted replacement for UUID.

In short, you need to create a CFUUID, and then store it in the Keychain on the iOS device, which persists even if you uninstall the app. Having written my own implementation along those lines (not the one I've linked to, obviously), I've yet to come across any real problems with this. It can even be accessed in your other apps that you make, so long as you access it with the same security parameters in aloof your apps.

Upvotes: 1

Related Questions