Mobile Locker JavaScript SDK
    Preparing search index...

    Variable deviceConst

    device: {
        get(): Promise<DeviceInfo | null>;
        isAtLeastVersion(version: string): Promise<boolean>;
    } = ...

    Type Declaration

    • get: function
      • Get hardware and app metadata for the current device.

        Returns 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: function
      • Check whether the Mobile Locker app version meets a minimum requirement.

        Parameters

        • version: string

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

        Returns 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
        }