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:
link1
link2
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!
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.
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).
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.
Device ID and uuid are flat concepts, describing the uniqueness of the device. uuid focuses on the uniqueness of the device hardware.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With