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