I'm working on an app that has a code authentication, in order to do that I have to know what device has activated the code. Is there a unique ID or something like that, that does not change even if the app gets reinstalled?
Asked
Active
Viewed 50 times
-1
-
You can get this answer from below linke. [enter link description here](https://stackoverflow.com/questions/21795707/how-to-get-unchanged-device-id-from-ios7-device-programmatically) – shivlal kumavat Mar 17 '18 at 08:29
-
From what link? – Sebastiano Taddei Mar 17 '18 at 08:32
-
UDID is unique for each device. – Uday Babariya Mar 17 '18 at 08:42
-
Ok i found the post from 6 years ago, but do you know how to use it? because it is not working for me – Sebastiano Taddei Mar 17 '18 at 09:05
-
You can use the new [DeviceCheck](https://developer.apple.com/documentation/devicecheck) API but it is iOS 11 only – Paulw11 Mar 17 '18 at 09:31
1 Answers
-1
You can use the identifierforvendor for this
UIDevice.current.identifierForVendor!.uuidString

stevenpcurtis
- 1,907
- 3
- 21
- 47