One solution that you can use is to provide your users with a user ID and password after registering them and allowing them to log in when you first launch your application. Associate the device identifier (unique) with the user identifier (during the registration phase) and check this device identifier when the user logs in. For authentication, you will need a web service.
source
share