2

I want to know who the user is without them actually logging in. There are bunch of methods on the internet and the one I am currently using is:

static let DeviceId = UIDevice.currentDevice().identifierForVendor.UUIDString

The problem is this resets when the user deletes and reinstalls my app. Also somehow this value changes in about 1-5% of the users without them actually deleting the app. It happens after they upgraded to a new iOS version. Possibly happens when they change appstore country too.

I want the user id to be unique no matter whatever the user does. Kind of like how Whisper app works.

What is the best way to do this? Advertising identifier looks really good on paper, but does apple allow using that just for user login info?

Should I use keychain? icloud? Is there some other value I can use?

Here are some sources I read about this topc:
http://tinymission.com/post/ios-identifierforvendor-frequently-changing
http://possiblemobile.com/2013/04/unique-identifiers/
How to preserve identifierForVendor in ios after uninstalling ios app on device?

Community
  • 1
  • 1
Esqarrouth
  • 38,543
  • 21
  • 161
  • 168
  • 2
    Apple doesn't allow unique id ... the best you can get is `identifierForVendor ` - everything else if detected by Apple leads to rejection. If a user has to login, ask for login credentials once and store them in keychain. If the suer deletes the app, redo from start. – Volker May 26 '15 at 12:42
  • redo from start: ask for login credential and store in keychain again – Volker May 26 '15 at 12:53
  • 2
    We already had the same question: http://stackoverflow.com/questions/25890292/how-to-identify-unique-users-without-using-a-login-system-ios My favorite answer for your this question is to use this library: http://github.com/fabiocaccamo/FCUUID that allows you to have good replacement of UDID. – Vanger May 27 '15 at 14:23

0 Answers0