device
const device: { get: Promise<DeviceInfo | null>; isAtLeastVersion: Promise<boolean>;};Defined in: domains/device.ts:41
Type Declaration
Section titled “Type Declaration”get(): Promise<DeviceInfo | null>;Get hardware and app metadata for the current device.
Returns
Section titled “Returns”Promise<DeviceInfo | null>
A DeviceInfo object, or null outside the iOS app.
Remarks
Section titled “Remarks”iOS app only. Returns null in all other environments.
Example
Section titled “Example”const info = await mobilelocker.device.get()if (info) console.log(info.app.version, info.hardware.model)isAtLeastVersion()
Section titled “isAtLeastVersion()”isAtLeastVersion(version): Promise<boolean>;Check whether the Mobile Locker app version meets a minimum requirement.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
version |
string |
Minimum required version string in major.minor.patch format (e.g. '5.2.0'). |
Returns
Section titled “Returns”Promise<boolean>
true if the current app version is equal to or greater than version.
Remarks
Section titled “Remarks”iOS app only. Returns false in all other environments.
Example
Section titled “Example”if (await mobilelocker.device.isAtLeastVersion('5.2.0')) { // use a feature introduced in 5.2.0}