diff --git a/config.xml b/config.xml index 2e8450a17..ad2eaf2a7 100644 --- a/config.xml +++ b/config.xml @@ -37,6 +37,13 @@ + + + + + + + diff --git a/src/app/modules/auth/cordova-browser.ts b/src/app/modules/auth/cordova-browser.ts index 43d0d03c0..eabb7e591 100644 --- a/src/app/modules/auth/cordova-browser.ts +++ b/src/app/modules/auth/cordova-browser.ts @@ -28,8 +28,7 @@ export class CordovaBrowser extends Browser { private inAppBrowserRef: InAppBrowserObject | undefined; private async useSafariViewController(): Promise { - const isSafariViewControllerAvailable = await this.safariViewController.isAvailable(); // Also returns true for Android chrome custom tabs - return this.platform.is('ios') && isSafariViewControllerAvailable; + return await this.safariViewController.isAvailable(); // Also returns true for Android chrome custom tabs } public async closeWindow(): Promise { @@ -43,7 +42,7 @@ export class CordovaBrowser extends Browser { } public async showWindow(url: string): Promise { - if (this.useSafariViewController()) { + if (await this.useSafariViewController()) { const optionSafari: any = { url: url, showDefaultShareMenuItem: false, @@ -65,7 +64,7 @@ export class CordovaBrowser extends Browser { clearsessioncache: 'yes' }; - this.inAppBrowserRef = this.inAppBrowser.create(url, '_self', options); + this.inAppBrowserRef = this.inAppBrowser.create(url, '_system', options); if (this.inAppBrowserRef != undefined) { this.inAppBrowserRef.on('exit').subscribe(() => this.onCloseFunction());