13

I am seeking a means of securely identifying a mobile device using a unique identifier. Every time I install my app on a specific device, I should get the same unique identifier. This identifier will be uploaded to the server backend and saved for future reference.

It is essential that this be achieved without any dependence on a phone's IMEI number. Apple has long since prohibited it for iOS, and Google may do the same tomorrow for Android.

For Android, at least there is ANDROID_ID. What about iOS ? Is there nothing at all ?

There has to be a standard, foolproof way of doing this for both Android & iOS. I am interested in any/all/paid/free/native/third-party solutions for the same. What have other companies done to solve this problem ?

I have already read the following posts:

1. Identifying App Installations.

2. Is there a unique Android device ID?

3. Getting a unique ID signature for every android device.

4. Persistent, Cross-Install Device Identifier on iOS: Using Keychain.

5. UIDevice uniqueIdentifier Deprecated - What To Do Now?

6. Always get a unique device id in iOS 7.

7. iOS7 - Device unique identifier.

8. Implementing Unique ID as UUID and saving it in Keychain.

I would like to go beyond this. What else can be done ? Is there a comprehensive, once-and-for-all, bulletproof solution out there ?

Community
  • 1
  • 1
Y.S
  • 28,153
  • 12
  • 86
  • 113

2 Answers2

5

From the posts you listed above, there're already answers to your question: on iOS, save a generated UUID into keychain, so that it persists even after re-installation. However, factory reset will clear that UUID, you should be aware of this limitation. This is not a foolproof solution, as it's limited by Apple's platform, but still, it's good enough and used by many apps.

utogaria
  • 3,492
  • 2
  • 11
  • 11
  • Thanks. This is not the comprehensive answer I was looking for, but I'll accept it for now. – Y.S Aug 30 '15 at 13:05
2

One year ago I've written an article talking about a solution that tends to be "bullet proof" for iOS: https://blog.onliquid.com/persistent-device-unique-identifier-ios-keychain/ .

My solution uses Apple IFA or IFV, and then falls back to a random UUID if those IDs are not available. The unique ID that is chosen is locally stored on your NSUserDefaults and also on the Keychain (not synchronised to the iCloud, of course).

This way you can uninstall and re-install the app and the Device ID is kept the same. I'm using this approach in millions of devices without any issue ;)

Cheers, Miguel

  • Thank you for your answer ... I shall pass it on to the iOS team ... They are still working on this ... :) – – Y.S Mar 08 '16 at 04:56