0

I want to know one unique id per device but not for per app in one device. I am building one framework where I want to use this device id.

  • There is no such id available, vender id is the only unique id that u get but that might change if user uninstalls and reinstalls ur app, if you are supporting iOS11 and above, device check API might come handy depending on what exactly you are trying to achieve. – Sandeep Bhandari Jul 31 '18 at 08:18
  • Possible duplicate of [How to generate Unique ID of device for iPhone/iPad using Objective-c](https://stackoverflow.com/questions/41016762/how-to-generate-unique-id-of-device-for-iphone-ipad-using-objective-c) – Piotr Golinski Jul 31 '18 at 09:24
  • Might be duplicate of https://stackoverflow.com/questions/41217864/unable-to-have-a-unique-ios-device-as-advertising-identifier-returned-as-000000 – Ellen Jul 31 '18 at 09:59

2 Answers2

1

get UUID from the iOS device and send it to the server

let uuid = NSUUID().UUIDString.lowercaseString
print(uuid)

Hope this helps !!!

0

Just create a unique number by yourself and then store it in the device keychain.

GeneCode
  • 7,545
  • 8
  • 50
  • 85
  • In device keychain If I store in one device, it can't be accessed on every app on that device. – user2343049 Jul 31 '18 at 09:17
  • enable keychain sharing which will allow you to access unique id among apps. – Ellen Jul 31 '18 at 09:54
  • @Ellen - keychain sharing requires same developer team. For me my framework will be used in different apps signing with different developer team. – user2343049 Jul 31 '18 at 10:18