> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

APISummary
# SystemInfo

`SystemInfo` is a plain JavaScript object that contains information of the current system.

## Syntax

```ts
declare const SystemInfo: {
  /**
   * The version of the Lynx Engine.
   *
   * @example '3.2'
   */
  readonly engineVersion: string;

  /**
   * The version of the Lynx Engine.
   * @example '3.2'
   * @deprecated Use `SystemInfo.engineVersion` instead
   */
  readonly lynxSdkVersion: string;

  /**
   * The current operating system version.
   */
  readonly osVersion: string;

  /**
   * The physical pixel height of the real device.
   */
  readonly pixelHeight: number;

  /**
   * The physical pixel width of the real device.
   */
  readonly pixelWidth: number;

  /**
   * The physical pixel ratio of the main screen.
   */
  readonly pixelRatio: number;

  /**
   * The platform of the current device.
   */
  readonly platform: 'Android' | 'iOS' | 'macOS' | 'windows' | 'headless';

  /**
   * The JavaScript engine currently used.
   * @note Not avaliable in lepus
   */
  readonly runtimeType: 'v8' | 'jsc' | 'quickjs';
};
```

### Fields

#### engineVersion

The Lynx Engine version, in format `major.minor`.

E.g.: `3.2`.

#### ~~lynxSdkVersion~~

The Lynx Engine version, in format `major.minor`.

E.g.: `3.2`.

#### osVersion

A string representing the current version of the operating system.

**iOS**

> [systemVersion | Apple Developer Documentation](https://developer.apple.com/documentation/uikit/uidevice/1620043-systemversion?language=objc)

```objc
[[UIDevice currentDevice].systemVersion UTF8String]
```

**Android**

Equivalent to the Java [`Build.VERSION.SDK_INT`](https://developer.android.com/reference/android/os/Build.VERSION#SDK_INT) API.

> [API Levels | Android NDK | Android Developers](https://developer.android.com/ndk/reference/group/apilevels#android_get_device_api_level)

```cpp
std::to_string(android_get_device_api_level())
```

#### pixelHeight

The absolute height of the available display size in pixels.

**iOS**

> [UIScreen | Apple Developer Documentation](https://developer.apple.com/documentation/uikit/uiscreen?language=objc)

```objc
CGSize screenSize;
if (!CGSizeEqualToSize(builder.screenSize, CGSizeZero)) {
  screenSize = builder.screenSize;
} else {
  screenSize = [UIScreen mainScreen].bounds.size;
}
const CGFloat scale = [UIScreen mainScreen].scale;
// highlight-next-line
const CGFloat pixelHeight = screenSize.height * scale;
```

**Android**

> [DisplayMetrics | Android Developers](https://developer.android.com/reference/android/util/DisplayMetrics)

```java
DisplayMetrics dm = context.getResources().getDisplayMetrics();
// highlight-next-line
int pixelHeight = dm.heightPixels;
```

#### pixelWidth

The absolute width of the available display size in pixels.

**iOS**

> [UIScreen | Apple Developer Documentation](https://developer.apple.com/documentation/uikit/uiscreen?language=objc)

```objc
CGSize screenSize;
if (!CGSizeEqualToSize(builder.screenSize, CGSizeZero)) {
  screenSize = builder.screenSize;
} else {
  screenSize = [UIScreen mainScreen].bounds.size;
}
const CGFloat scale = [UIScreen mainScreen].scale;
// highlight-next-line
const CGFloat pixelWidth = screenSize.width * scale;
```

**Android**

> [DisplayMetrics | Android Developers](https://developer.android.com/reference/android/util/DisplayMetrics)

```java
DisplayMetrics dm = context.getResources().getDisplayMetrics();
// highlight-next-line
int pixelWidth = dm.widthPixels;
```

#### pixelRatio

The natural scale factor associated with the screen.

**iOS**

> [UIScreen | Apple Developer Documentation](https://developer.apple.com/documentation/uikit/uiscreen?language=objc)

```objc
const CGFloat pixelRatio = [UIScreen mainScreen].scale;
```

**Android**

> [DisplayMetrics | Android Developers](https://developer.android.com/reference/android/util/DisplayMetrics#density)

```java
DisplayMetrics dm = context.getResources().getDisplayMetrics();
// highlight-next-line
float pixelRatio = dm.density;
```

#### platform

The platform of the current device.

Candidate values:

1. `iOS`
2. `Android`
3. `macOS`
4. `windows`

#### runtimeType

The JavaScript engine currently used.

:::info
This is only avaliable in the background thread.
:::

Candidate values:

1. `quickjs`
2. `jsc`
3. `v8`

See [JavaScript Environment](/next/guide/scripting-runtime/index.md) for more details.

## Compatibility

**Compatibility Table**

**Query:** `lynx-api.global.SystemInfo`

[Source](https://github.com/lynx-family/lynx-website/tree/main/packages/lynx-compat-data/lynx-api/global/SystemInfo.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| SystemInfo | Yes (1.3) | Yes (3.4) | Yes (1.3) | Yes (3.5) | Yes (3.5) | Yes |
| SystemInfo.engineVersion | Yes (3.2) | Yes (3.4) | Yes (3.2) | Yes (3.5) | Yes (3.5) | No |
| SystemInfo.lynxSdkVersion | Yes (2.4) | Yes (3.4) | Yes (2.4) | Yes (3.5) | Yes (3.5) | Yes |

**`SystemInfo`**

Information of the current system

**Specifications:**

**`SystemInfo.engineVersion`**

**Specifications:**

**`SystemInfo.lynxSdkVersion`**

**Status:** Deprecated

**Specifications:**

- **Web — Supported (version unknown):** Implemented since `@lynx-js/web-core@0.13.0` (lynx-family/lynx-stack#628).

