0

Is there any way to generate unique id for IOS devices?

I have a framework that helps to the apps to take login token from it, I am using identifierForVendor with no problems because all consumer apps published from same vendor, but I want to add another one from different publisher and adding that app to chain, identifierForVendor is no work anymore,

Also I can't use keychain since they are using different team id,

So can you please let me know if there is any other way to do this?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user2628268
  • 83
  • 1
  • 5
  • See the solution in [this](https://stackoverflow.com/questions/19179799/how-to-identify-ios-device-uniquely?rq=1) thread – ahmed Nov 09 '17 at 19:41
  • Apple has worked very hard to prevent device tracking. You can use the IDFA for security purposes, but be aware that the user can reset this at any time. – Paulw11 Nov 09 '17 at 21:23

3 Answers3

1

If I'm not mistaken Apple has revoked access to the real device identifier (UDID) and rather provides a pseudo-identifier to limit malicious usage thereof.

Refer to this previous answer https://stackoverflow.com/a/19402414/28305.

Craig Nicholson
  • 1,241
  • 1
  • 11
  • 21
  • Yes, I know but I am asking any workaround, maybe collecting some hardware information and creating a hashed value. – user2628268 Nov 09 '17 at 19:16
  • Seeing as Apple has revoked access to the UDID due to mis-use I reckon they won't take kindly to anyone trying to defeat it. If you have a common back-end service between the vendor apps, perhaps you can store it per vendor app on the device using the external service. – Craig Nicholson Nov 10 '17 at 08:49
0

UDID is not available anymore so you can use

UIDevice.currentDevice().identifierForVendor?.UUIDString

more here

Or you can use DeviceCheck framework that is available from iOS 11

Just create a new key in Apple Developer account and generate a token with

DCDevice.current.generateToken(completionHandler:)

Note: You must use only real device to receive token.

You can find good tutorial here

DenFav
  • 2,683
  • 1
  • 18
  • 27
0

Short answer: no because of data privacy concerns (at least in the official statements).

Apple blocked access to 'identifiers' such as UDIDs and hardware data such as MAC addresses and others. Even if there is currently such as field, as soon as it's exploited by a certain amount of people it will be removed or obfuscated soon.

The only thing that might work for a while is trying to get a browser fingerprint of the current device.

Carsten
  • 1,029
  • 14
  • 29