Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which unique device identifier do we have on iOS that does not change when an application is installed / removed / re-installed

Tags:

uuid

ios

swift

I want to be collecting both the installation event (on the new app) and the account creation event (on all the old apps).

To ensure uniqueness and prevent fraud (that is each installation should correspond to a unique device, and should remain the same event if the app is un-installed and re-installed again on the same device) we can use hardware identifiers that can survive uninstall.

On android phone IMEI can be used as unique identifier, but this solution is not repeatable on iOS as Apple does not give access to any hardware or unique identifier for privacy reason.

I tried the approaches proposed in the following links:

  1. link1

  2. link2

  3. link3

    From link 1 & 3 I tried:

    let deviceID = UIDevice.current.identifierForVendor!.uuidString

But this does not provide a unique ID that will remain the same once the app is un-installed and re-installed again.

Please is there a better approach for me to handle this issue in swift. Thank you!

like image 770
Foutse Avatar asked Apr 05 '18 12:04

Foutse


People also ask

Is iOS device ID unique?

Every Apple iPhone, iPod touch and iPad has a unique device ID number associated with it, known as a Unique Device ID (UDID). Apple's device ID is a 40-digit sequence of letters and numbers. Customers can access their device ID numbers in iTunes or by downloading a free app from the Apple App Store.

What is a UUID iOS?

UUID (Universally Unique Identifier): A sequence of 128 bits that can guarantee uniqueness across space and time, defined by RFC 4122. UDID (Unique Device Identifier): A sequence of 40 hexadecimal characters that uniquely identify an iOS device (the device's Social Security Number, if you will).

Does Apple still use UDID?

Apple has informed app developers that it will no longer allow apps to use the unique device identifier or UDID after May 1, according to a post on Apple's developer website. Instead, Apple requests developers use the new 'Vendor or Advertising identifiers' that were introduced in iOS 6.

Is device ID and UUID the same?

Device ID and uuid are flat concepts, describing the uniqueness of the device. uuid focuses on the uniqueness of the device hardware.


1 Answers

You can use Device Check API introduced in iOS 11, if you want to identify user's device even if user reinstalls your app.

Your server can use the generated token on the apple device. for more details please refer the following documentation

https://developer.apple.com/documentation/devicecheck/dcdevice/2902276-generatetoken

like image 157
Abhishek Avatar answered Oct 15 '22 02:10

Abhishek