by Oliver Goldman

 Comments (2)

Created

August 19, 2011

I’ve written earlier to explain that AIR doesn’t include a device identifier API because it doesn’t have a useable definition across platforms. (Also, it can be easily replaced for most use cases with a random identifier generated by the app.)

Now comes news that this capability is becoming even less implementable: Apple is deprecating their own UDID API. TechCrunch has the story at http://techcrunch.com/2011/08/19/apple-ios-5-phasing-out-udid/.

Math.random() is your friend.

COMMENTS

  • By Rosyna - 5:53 PM on August 20, 2011   Reply

    Is Maith.random() a cryptographically secure pseudo-random number generator? If not, best to never use it for a UUID.

    • By Oliver Goldman - 3:12 AM on August 22, 2011   Reply

      No, Math.random() is not cryptographically secure. However, the new-to-AIR 3 generateRandomBytes() function is and, as you point out, is better suited to this use.

ADD A COMMENT