Mobile device uniqueness for iOS and Android
Asked Answered
L

2

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 ?

Laubin answered 11/8, 2015 at 4:34 Comment(1)
MAC Address or UUID for IOSChuckhole
S
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.

Shaum answered 11/8, 2015 at 5:33 Comment(1)
Thanks. This is not the comprehensive answer I was looking for, but I'll accept it for now.Laubin
T
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

Tagore answered 7/3, 2016 at 15:8 Comment(1)
Thank you for your answer ... I shall pass it on to the iOS team ... They are still working on this ... :) –Laubin

© 2022 - 2024 — McMap. All rights reserved.