0

As UDID is deprecated, is there any other possible solution to get a unique device identifier ? We can use vendorIdentifier, but it wont be same if user reinstalls the app for next time. Previously i was using OpenUUID, which was one of a better solution, but it seems to be deprecated now. My requirement is to send a unique device identifier, which should be same even if user deletes or reinstalls the application. We cant use ad identifier as my application is not using any iAd Framework and there should be a chance of rejecting the application from store if i uses ad identifier without properly configuring iAd.

Can i use "CFUUIDCreateString" and store it keychain so that it will be same till the user resets the application ? Is there any other risks in doing so ?

  • check http://stackoverflow.com/questions/25925481/how-to-get-a-unique-device-id-in-swift – Vinod Kumar Apr 12 '17 at 08:05
  • As i mentioned, Vendor identifier wont be same if we delete and reinstalls the application. – Steve Smith Apr 12 '17 at 08:13
  • maybe as this is not available you could explain why you need it and we could suggest alternate solutions :D – Sean Lintern Apr 12 '17 at 08:15
  • Use case - Our application should be restricted for a user to use his n devices only and if he is logging to his (n+1)th device, login should not happen on that time. For that purpose, we need to send some unique identifier to identify a device. – Steve Smith Apr 12 '17 at 08:21
  • 2
    In this case, you would need to create some kind of token-based system, where the user registers for a token with their user account for a particular install of the app. The system should only issue n tokens, and if the user needs to switch to another device, they would need to de-register and re-register with the new device. The key should be the user account ID (e.g. email address), to which a number of tokens are issued. Once a token has been issued, it is stored on the device and sent back to the server with each request. If the user logs into device n+1, no new tokens would be available. – CPR Apr 12 '17 at 08:27

1 Answers1

1

You cannot and should not attempt to use a persistent identifier that survives re-installs. IDFA is going to be the most reliable source of a single identifier, but as you said, you will need the iAd framework to use it, and you need a good reason for doing so when you submit to the app store. If Apple finds any other kind of persistent identifier, they will probably reject your app. The only other (very unreliable) method of doing this is server-side device fingerprinting, but this would likely yield poor results.

CPR
  • 753
  • 8
  • 19
  • I faced similar issue (http://stackoverflow.com/questions/21489097/my-app-was-just-rejected-for-using-the-ad-support-framework-which-library-is-re) in the past due to the inclusion of iAD framework, only for the purpose of Ad identifier. – Steve Smith Apr 12 '17 at 08:18