Back in April I used Titanium.Platform.id to grab that UDID and submit to server, so we can track devices and match them to users. But when I just used the latest Titanium with latest XCode, that Titanium.Platform.id has changed!! It's not the same number anymore. It's still guid-like, but all uppercase, and a completely different number.
Most importantly, how can a typical user find out their Titanium.Platform.id on their own? There are apps you can download that will show you your UDID, but it's changed now, so how do they get their own Titanium.Platform.id?
Also, what does this new number mean? The old UDID is still present on the device (we can query it with various free apps)...but where does this new number come from?
Ti.Platform.id creates a "unique" identifier only valid for one installation and one app. That means that, if you remove the app and reinstall again, the id will change. And also means that two apps never will have the same id.
In the past, that id was the Apple UDID (a hardware identifier assigned by apple to each device), but due to new apple restrictions, that udid should not be used anymore. That's why appcelerator changed its behavior.
So, there's no way from Titanium to get the original Apple UDID. You can develop your own native module, but note that the app may be rejected if you publish it in App Store. The fact that other apps are using it is not a reason to think that your app could use it also.
Changes were made to the way
Ti.Platform.id works to comply with the rule changes Apple made in response to security issues back in Oct 2011.
You can read more about it in their blog post about it.
One technique we have used to ensure the application gets an anonymous ID that persists is to generate one when the app is installed initially, and then store that in the user's keychain. If the user were to then uninstall and reinstall the app, the app will check the keychain for an associated ID. If it finds the ID, it uses that one. If none exists, it will generate a new one.
A major benefit of this technique is that it ties the application to to the user rather than the device. So if the user sells the device and moves on to a new one, their application id comes with them (assuming you allow the keystore to back up to iCloud). We used this in a scratch card app to keep the user from uninstalling/reinstalling until he/she gets a winning card.
Hope this helps! There is a good module in the Titanium marketplace that handles the keychain.
Think you can help? Login to answer this question!