diff --git a/packages/core/platform/index.android.ts b/packages/core/platform/index.android.ts index 56db49cec..e174b7025 100644 --- a/packages/core/platform/index.android.ts +++ b/packages/core/platform/index.android.ts @@ -57,6 +57,9 @@ export class Screen { static mainScreen = new MainScreen(); } +// This retains compatibility with NS6 +export const screen = Screen; + class DeviceRef { private _manufacturer: string; private _model: string; @@ -145,5 +148,8 @@ class DeviceRef { export const Device = new DeviceRef(); +// This retains compatibility with NS6 +export const device = Device; + export const isAndroid = global.isAndroid; export const isIOS = global.isIOS; diff --git a/packages/core/platform/index.d.ts b/packages/core/platform/index.d.ts index aec73b096..2250bc73b 100644 --- a/packages/core/platform/index.d.ts +++ b/packages/core/platform/index.d.ts @@ -121,7 +121,21 @@ export class Screen { static mainScreen: ScreenMetrics; } +/** + * An object describing general information about a display. + * + * This retains compatibility with NS6 + */ +export const screen = Screen; + /** * Gets the current device information. */ export const Device: IDevice; + +/** + * Gets the current device information. + * + * This retains compatibility with NS6 + */ +export const device = Device; diff --git a/packages/core/platform/index.ios.ts b/packages/core/platform/index.ios.ts index ef1de6bc1..291896615 100644 --- a/packages/core/platform/index.ios.ts +++ b/packages/core/platform/index.ios.ts @@ -119,9 +119,15 @@ class MainScreen { export const Device = new DeviceRef(); +// This retains compatibility with NS6 +export const device = Device; + export class Screen { static mainScreen = new MainScreen(); } +// This retains compatibility with NS6 +export const screen = Screen; + export const isAndroid = global.isAndroid; export const isIOS = global.isIOS;