diff --git a/packages/core/platform/index.android.ts b/packages/core/platform/index.android.ts index 00f2ed1a0..e174b7025 100644 --- a/packages/core/platform/index.android.ts +++ b/packages/core/platform/index.android.ts @@ -57,9 +57,8 @@ export class Screen { static mainScreen = new MainScreen(); } -export class screen { - static mainScreen = Screen.mainScreen; -} +// This retains compatibility with NS6 +export const screen = Screen; class DeviceRef { private _manufacturer: string; @@ -148,6 +147,8 @@ class DeviceRef { } export const Device = new DeviceRef(); + +// This retains compatibility with NS6 export const device = Device; export const isAndroid = global.isAndroid; diff --git a/packages/core/platform/index.ios.ts b/packages/core/platform/index.ios.ts index 48ad6b8a4..291896615 100644 --- a/packages/core/platform/index.ios.ts +++ b/packages/core/platform/index.ios.ts @@ -127,9 +127,7 @@ export class Screen { } // This retains compatibility with NS6 -export class screen { - static mainScreen = Screen.mainScreen; -} +export const screen = Screen; export const isAndroid = global.isAndroid; export const isIOS = global.isIOS;