How is session.props.device.identifier generated?

I see that the device identifier session property that ignition generates is a UUID. Would it be possible to know how it’s generated? I suppose it uses some info from the device, like the MAC address or the IMEI.


They are randomly generated and stored locally. If you uninstall and reinstall or clear app data you’ll get a new UUID.

So there’s no way to have a permanent, deterministic device id guaranteed to univocally identify a device? (Regardless of reinstalls)

Not from scripting (as those scripts would all be run on/against the Gateway in Perspective). I don’t know that there is a way to provide something in Session.props which would obtain some value rom the Device, but I’ll have to leave the definitive answer for that to someone from Dev.

You could request that a user supply an identifier which is present on the device, a la “Enter Device Serial”, and have the serial number stamped/labelled on each device.

Really, there’s no way to do this in any reliable sense for any computing device. MAC addresses, user agents, screen resolutions, etc, can all be trivially spoofed. Collecting the IMEI of every user’s device is invasive, and, in a post-GDPR world, potentially illegal - not something that should be done lightly.

Sure, but that wouldn’t come through or be available at the beginning of the perspective session. I need something to use to identify a given device even if its perspective session changes (eg due to disconnection from gateway because of poor connectivity).

The IMEI would be used only to generate the device ID (which would then be immutable) and not stored or communicated or transmitted in any other way.

The current identifier already does this - it’s stored on the device, so unless you have users specifically looking to clear application data, this will already meet your needs.

Phones could be reset to factory or sent to service, which would likely delete everything. Moreover, I need to tie an ignition device id to a phone entry in a database, so the id should really be immutable (and possibly predictable, so I could store the ignition device id in the db when a new phone arrives and the operator creates it in the backoffice app), hence my original question.