Skip to main content

Device hash

The device hash is a SHA256 hash of a universally unique identifier (UUID) that the SDK generates using Apple's CFUUIDCreate function and stores in the end-user's iCloud Keychain.

How does it work?

The device hash is the same for all registrations in the same application, as the SDK only generates it when the UUID is missing.

If you have different applications integrated with Encap, then each application generates its own unique UUID. This means that the device hashes will be different across those applications, even if you install them on the same mobile device.

Example flow

  • If you install App A on your device, then device hash X is generated.
  • If you delete and reinstall App A on the same device, then device hash X is retained.
  • If you install App B on the same device, then device hash Y is generated.

Device hash deletion

The device hash is not deleted during deactivation, or if the app is uninstalled and installed again.

A factory reset deletes the device hash if the mobile device is not restored from a backup. In this case, the SDK generates a new UUID the next time an activation is performed.

Device hash in iCloud backups

Although the SDK may send the device hash to the backend server through Protobuf during backup registration, it explicitly excludes it from the local recovery data.

The device hash is not saved to the encrypted backup blob stored in the end-user's iCloud Keychain.

If you restore a backup to a new iPhone, it will not contain the device hash of the original, backed-up iPhone.