Search code examples
iosauthenticationuuidudid

How to identify unique users without using a login system (iOS)


I need to have a way to identify the users of my app, but without having a login system.

I looked into the UUID which gives me part of an answer to my problem, but as it's not the real UDID, it's not "really unique" : if the user re-installs the app, he gets a new UUID, and this can't work for me.

Is there a way I can get the device serial number or something unique like that? Anything of the sort that i could get from the device without having the user to fill any fields.


Solution

  • After a while we decided that it was either unreliable, impossible or really annoying to get unique user ID's without asking them to fill some kind of field and actually sign up.

    We therefore decided to use their encrypted formatter phone numbers using the following process :

    • Ask for phone number & international code* (+1, +32, etc.)
    • Verify integrity of phone number programatically
    • If satisfactory, ask user to verify with alert
    • If okay, send pin code and wait for validation
    • If valid, signup to database.

    The user's username is : formatted phone number (+32495555556 for example), and that string is then hashed in SHA-256, and finally we save that super-long string to the database and recognize everyone like that.

    If you have any question please ask here so I can give some clarification. If you have a better idea I'd still be glad to hear it.