Zeeshan Anjum
Zeeshan Anjum

Reputation: 148

How to stop users from using an app over two devices?

I have an iOS application in which i am using Facebook login, and after that phone verification is done which lets the user continue with the app. I ask for phone verification only once when user is being registered.

I wanted to ask if there is any way i can stop users from using the app on two devices? because application records user's footprints(location) and current location, if users use the app on two devices, locations updates will be made by both devices and there won't be any way to tell which location belongs to the user?

Can i use UUID or some other identifier?

Upvotes: 0

Views: 195

Answers (2)

Rashad
Rashad

Reputation: 11197

Well, I had to do a similar thing once. The app used to have in app purchase of number of device it can run for a single user. What I did was:

  1. I used to take the UUID of the device while signing in to my app and send it to server.

  2. In my server side database could store the UUID against a user. Whenever a user tries to sign in I used send the UUID with the sign in request.

  3. If the UUID was present then I return success response otherwise I used to check the number of device allowed for this user. If adding this device exceeds the limit then I used to send failure response. Otherwise used to insert the UUID against that user and return a success response.

  4. Suppose if a user deletes the app from a device and want to login from another device. Then display a popup like "Do you want to change the device?" If he/she say Yes then I used to update the UUID and allow him/her to use the app in this device. And every time the app starts (new launch or from background) I used to check the UUID against server's UUID.

You can design your own system but using device UUID gives some extra benefit. like you don't need to store the UUID anywhere and you can rely on its uniqueness.

Upvotes: 0

dasdom
dasdom

Reputation: 14073

You are not allowed to use the UUID. But you can generate a vendor id. But you will need to check if the user already uses on device on some kind of server and let the App ask if it is allowed to run.

But keep in mind that Apple doesn't like such things.

Upvotes: 1

Related Questions