Apps are not allowed to access the device UDID.
The API for accessing a unique identifier for each device will return a new random ID if you uninstall then reinstall the app.
This is specifically designed to make it impossible for an app to track users of the app.
You must ask the user to type in their email or something, if you want to tell one user from another.