Appcelerator Blog

The Leading Resource for All Things Mobile

The new way we UDID

0 Flares 0 Flares ×
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 “”, 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 “” 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:
[gist id=”1299455″]
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.
0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×


  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 😉

    • Matt Apperson

      Yes, the the ti id is unique and consistent in every request

  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.


  3. Thank you for this, I am hoping 1.8 will have this built in with a single request.

  4. Alan Leard

    Great post Matt. Thanks for clarifying the issue and making that module available!

  5. Johan Lundin

    From which version of the Titanium SDK does no longer return the native udid?

    • Kevin Whinnery

      @Johan this is a new change as of 1.7.3

  6. Can someone comment on Henning Glatter-Gotz’s question above. I need to know the answer as well. thanks.

  7. Kevin Whinnery

    @henning @manish 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).

  8. Does this solve the problem with Android 2.2 devices returning the same id?

  9. byF

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

  10. John Galt

    Looks very promising but I was having Android issues before.

    Real Estate IDX

  11. lucassp

    My tiapp.xml becomes invalid after adding the module line:


    any hints?

  12. Alexandros

Comments are closed.

Sign up for updates!

Become a mobile leader. Take the first step to scale mobile innovation throughout your enterprise.
Get in touch
computer and tablet showing Appcelerator software
Start free, grow from there.
0 Flares Twitter 0 Facebook 0 Google+ 0 LinkedIn 0 Email -- 0 Flares ×