They are used for identifying a specific device, which can be used in turn as a type of account id. Each application on the device is completely separate from the others, if you have an application such as a social network the user would need to login separately for every app. This in itself, isn't so bad, the problem is that applications can tie this information to create databases that might tie together things. For instance, OpenFeint was using the UDID for single sign-in. A researcher found that the profile pictures from Facebook contained the Facebook userid. If a user using OpenFeint was using the Facebook profile image, then that UDID could be used to find the Facebook profile. OpenFeint fixed that loophole immediately by obscuring the URLs, but the general problem remained, anyone could write an app to gather UDID information and many did.
How to deanonymize with OpenFeint
There isn't any way that a user can stop an app from reading the UDID, a jailbroken phone can change them IIRC.
In response, Apple deprecated the UDID. Although many places have said that Apple rejects apps that use UDID, this is not completely true. Apple started rejecting apps that used UDID but didn't tell you. There are still many apps collecting the information.
There are a few alternatives, with varying degrees of success:
* Each app makes a GUID, stores locally. Which works great for one-off apps, but doesn't allow multiple apps to collate data (either a benefit or drawback depending on who you are). It also means you will lose data on a reset.
* use a different ID, such as MAC. Essentially the same thing, with the same drawbacks, not recommended.
* Facebook and other networks have started using a Cookie stored in Safari. This means that the registration actually leaves the application and returns to it using a specially crafted URL. This way, each app can simply round-trip to Safari to grab the cookie. Complicated, but it works
* Use UIPasteboard. This is an API that allows you to store information that other apps can read. It's sort of a hack, but some libraries are using it.