From a69a9d6921bd1df11b29c9b697bfb847a3885458 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Fri, 13 Jan 2023 18:02:44 -0800 Subject: [PATCH] fix(ios): embedder usage of window (#10167) --- packages/core/application/index.ios.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/application/index.ios.ts b/packages/core/application/index.ios.ts index 23ab08e05..d00acc302 100644 --- a/packages/core/application/index.ios.ts +++ b/packages/core/application/index.ios.ts @@ -166,7 +166,7 @@ export class iOSApplication implements iOSApplicationDefinition { get rootController(): UIViewController { if (NativeScriptEmbedder.sharedInstance().delegate && !this._window) { - this._window = UIApplication.sharedApplication.delegate.window; + this._window = UIApplication.sharedApplication.keyWindow; } return this._window.rootViewController; } @@ -254,7 +254,7 @@ export class iOSApplication implements iOSApplicationDefinition { this.setWindowContent(args.root); } } else { - this._window = UIApplication.sharedApplication.delegate.window; + this._window = UIApplication.sharedApplication.keyWindow; } }