Cordova inAppBrowser not working after update to latest ionic and iOS 11

Having issue after updating ionic to latest due to iOS 11 issues. All the iOS 11 viewport issues were resolved except ran into InAppBrowser issue.The InAppBrowser plugin was working for many months without any issues before the npm / ionic update on both iOS and Android devices.
Steps to recreate the issue
–Downloaded latest blank project from ionic
–Downloaded latest plugin 2.7.1 from npm i cordova-plugin-inappbrowser
–Downloaded ionic-native plugin

Tried following ways:

import { InAppBrowser } from ‘@ionic-native/in-app-browser’;
–in code
this.platform.ready().then(() => {
new InAppBrowser(encodeURI(‘https://google.com’),"_system");
});

–Per ionic docs
import { InAppBrowser } from ‘@ionic-native/in-app-browser’;
const browser = this.iab.create(‘https://google.com/’);
browser.close();

There is no issue in browsers and in device no warning is shown in debug console when clicked.

Is there any solution for this?

1 Like

Have you tried to add the following inside you config.xml? (replace with your own domain)

    <allow-navigation href="https://your.domain.com/*" />

Thanks for your time. This didn’t fix the issue. However, after banging my
head on this issue for many hours I was able to resolve this by adding the
cordova InAppbrowser plugin in the config.xml besides other cordova
plugins. Why InAppbrowser plugin is not included when ios build is
performed is a question for someone in Ionic…team There was no need to
add this plugin in the ionic version I had prior to updating to the latest
ionic version as of today that fixed ios 11 related issues.

Now all the functionality in the app is working in ios 11 as was in ios 10.

“cordova”: {
“plugins”: {
“ionic-plugin-keyboard”: {},
“cordova-plugin-whitelist”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {},

////////Added inappbrowser here in the config.xml
"cordova-plugin-inappbrowser": {}
},
“platforms”: [
“ios”
]

1 Like