Skip to content

device

const device: {
get: Promise<DeviceInfo | null>;
isAtLeastVersion: Promise<boolean>;
};

Defined in: domains/device.ts:41

get(): Promise<DeviceInfo | null>;

Get hardware and app metadata for the current device.

Promise<DeviceInfo | null>

A DeviceInfo object, or null outside the iOS app.

iOS app only. Returns null in all other environments.

const info = await mobilelocker.device.get()
if (info) console.log(info.app.version, info.hardware.model)
isAtLeastVersion(version): Promise<boolean>;

Check whether the Mobile Locker app version meets a minimum requirement.

Parameter Type Description
version string Minimum required version string in major.minor.patch format (e.g. '5.2.0').

Promise<boolean>

true if the current app version is equal to or greater than version.

iOS app only. Returns false in all other environments.

if (await mobilelocker.device.isAtLeastVersion('5.2.0')) {
// use a feature introduced in 5.2.0
}