Get an Id for the current IOS device

As of IOS 7, one that need a unique ID for an installment, need to use “identifierForVendor” with B4I it should be done like that:

Dim device As NativeObject
device = device.Initialize("UIDevice").RunMethod("currentDevice", Null)
Log(device.GetField("identifierForVendor"))

Caution the identifierForVendor value will change if your user reinstall all of your apps ( the identifier is computed using the 2 first parts of your appId.

Screen-Shot-2013-04-09-at-12.21.16-PM1

If your Appid is org.nopapers.myApp then identifier is computed using org.nopapers.

B4X thread

The Developer’s Guide to Unique Identifiers

B4X thread

Leave a Reply