2

I really have problem with getting unique deviceID. The code I am using now it this :

UIDevice.currentDevice().identifierForVendor!.UUIDString

I need it to be unique because it will be used at every async call Here is my state

1.Install app from Xcode (using that deviceID which is first time generated.) 2.Then I remove the app. 3.Then I install the app again from Xcode. 4.Device ID changed

So,how to make it unique to only one device = one id no matter where it install Xcode,TestFlight,AppStore.

Thiha Aung
  • 5,036
  • 8
  • 36
  • 79
  • As you've noticed, the vendor identifier is discarded when the application is removed. Short of some form of remote authorization and storage, there's not much way to keep the identifier persistent around remove and reinstall. That's really pretty much the whole point of removing access to the UDID and other persistent identifiers. – David Berry Feb 20 '16 at 07:07
  • It might be possible to work around it using the Security storage options, but I'm thinking even those are erased with the application. – David Berry Feb 20 '16 at 07:08
  • 1
    See this question http://stackoverflow.com/questions/17561938/is-there-a-persistent-replacement-for-udid – David Berry Feb 20 '16 at 07:09
  • 1
    Here we go, looks like this question is pretty much identical to yours. http://stackoverflow.com/questions/21878560/how-to-preserve-identifierforvendor-in-ios-after-uninstalling-ios-app-on-device – David Berry Feb 20 '16 at 07:11
  • @DavidBerry,can you help me out : http://stackoverflow.com/questions/35520040/working-with-access-control-in-swift – Thiha Aung Feb 20 '16 at 07:23

0 Answers0