The new way we UDID

The failure of business shown by global network connection in hand of businessman is broken

A major change that came along with iOS5 was Apple’s deprecation of a platform-generated unique device identifier (UDID). In previous Titanium releases, this property was accessed via “Ti.Platform.id”, and was frequently used to track per-user data in mobile applications.

While this property can still be accessed in iOS 5, it is not certain how long it will remain available. To avoid confusion, and ensure that new apps do not use a deprecated API, we replaced the Apple UDID with our own. This means that “Ti.Platform.id” now returns a Titanium-created ID that uses CFUUIDCreate [edited: the usage of MAC address was incorrect].

While we recommend that all developers move away from using the old UUID property as soon as possible, we created a module to expose this deprecated property, to help provide a grace period in which you can transition to the new one.

To use this module:

  1. Download the module
  2. Copy this zip file into the folder of your Titanium SDK
  3. Add <module version=”1.0″ platform=”iphone”>ti.udid</module> to your TiApp.xml where you currently have </modules>
  4. Use the oldUDID property to access the old UDID… once Apple stops supplying this, it will simply return a blank string. (for an example of how to call this property see this file)

Then to update your UDID, simply do something along these lines:

To be clear, this module should NOT be considered a permanent workaround to Apple’s UDID changes. We provide it purely to help you to migrate to the new Titanium-created UDID.
Update: This module has been removed entirely and usage of it at this point will result in app store rejection.

14 COMMENTS

  1. we’ve thougt about macid as solution too but we decided NOT to use it because the wifi and the 3g module respond diffferent ids. how do you handle this?

    just to clarify: the new ti id is unique and consitent in every request?

    disclaimer: i did not look in the sourcefiles so far but on a bus you have nothing to do except writing comments on blogposts 😉

  2. Matt,

    When you say “unique and consistent in every request”, does that also mean that it is persistent across app launches and app removal and reinstallation?

    In other words has the same characteristics as the Apple UDID, the TI-ID will always be the same for a given device, regardless of OS version, application version, etc.

    Thanks
    Henning

  3. @henning @manish Ti.Platform.id is not completely static – it would be subject the change due to a number of actions to update the device a user might take (os upgrade being one).

  4. Hi! We’re using SDK 1.8.0 from Nov 8 and the device id returned by Ti.Platform.id is not consistent across app launches. Which basicly makes our “fraud” blocking mechanism unusable.

Comments are closed.