Cordova Inappbrowser plugin stopped working in IOS 10


#1

We were using this Cordova Inappbrowser plugin in our Ionic 1 app for more than a year. after updated my IOS 10 the cordova inappbrowser stopped working. We tried to debug but still couldn’t get any resolution. Please find the below code how we use Inappbrowser in our code.
Plugin Name : cordoba-plugin-inappbrowser 1.5.0

  window.open('http://google.com','_system','location=yes');

#2

This is true. Did you solve your problem? if yes, how?


#3

There’s an updated version of the plugin that’s been recently released to fix some ios10 issues. Don’t know if it’ll fix your particular challenges as I can’t tell what’s gone wrong for you exactly. It’s worth a try though, I’d have thought.

To update simply remove and re-add the plugin.

cordova plugin rm cordova-plugin-inappbrowser
cordova plugin add cordova-plugin-inappbrowser


#4

I don’t see an issue
I am using cordova-plugin-inappbrowser 1.4.0 "InAppBrowser"

Here is an example of how I am using it (Note the return - its important)


#5

Thanks for the suggestion. my issue got resolved the issue was more related to the security for opening any links using inappbrowser.

Issue resolved by adding gap://ready; in index.html


#6

Issue resolved by adding gap://ready; in index.html

How exactly did you do this? What does the markup look like?

Thanks in advance


#7

HI Landels,

we had to enable the debug console on Mac to to get the exact error, later we figured out error related to gap and fixed it.

Thanks,


#8

In ios 10 with xcode 8’re following error and does not work.
Could you explain better how managed to solve?

check your plugin mapping in config.xml.
2016-10-10 16:43:05.688 cute[58504:582355] -[CDVCommandQueue executePending] [Line 142] FAILED pluginJSON = [“InAppBrowser1328457739”,“InAppBrowser”,“open”,[“http://ngcordova.com/","_blank","location=yes,clearcache=yes,toolbar=no”]]


#9

change < meta > in “index.html”
<meta http-equiv=“Content-Security-Policy” content=“img-src * ‘self’ data:; default-src * ‘self’ gap: wss: ws: ; style-src ‘self’ ‘unsafe-inline’; script-src ‘self’ ‘unsafe-inline’ ‘unsafe-eval’;”>
it work for me


#10

+1 Exactly the answer i was looking for


#11

I would buy you a beer if I could. This works !


#12

hi i’ve tried editing the index.html file with gap: but it isn’t working, i’ve also tried reinstalling and updating the inappbrowser plugin but it still doesn’t work properly - ive tried versions 1.4.0 and 1.7.1 (latest version). When i try to open the popup nothing shows until i leave the app or double click the home button and then return to the app. im using ionic version 1.3.14 with cordova 6.2.0 and xcode 8 to build the app.


#15

We are suffering the same issue recently. We are using inappbrowser 1.7.0, cordova cli 7.0.1, xcode 8.3.3.


#16

Did you find an answer? I also hit this issue. window.open working in Safari, so it’s not the normal “block window.open because this isn’t a synch call” logic. I’ve tried all of the following within the app - no error/exception - just ignored:
div class=‘btn’ onclick=‘var x = window.open(“https://www.google.com”, “_blank”); console.log(“x:” + x);’>Open google search/div
div class=‘btn’ onclick=‘var x = window.open(“https://www.google.com”, “_system”); console.log(“x:” + x);’>Open google search/div
div class=‘btn’ onclick=‘var x = window.open(“https://www.google.com”, “_self”); console.log(“x:” + x);’>Open google search/div
div class=‘btn’ onclick=‘var x = cordova.InAppBrowser.open(“https://www.google.com”, “_self”); console.log(“x:” + x);’>Open google search/div
div class=‘btn’ onclick=‘var x = cordova.InAppBrowser.open(“https://www.google.com”, “_blank”); console.log(“x:” + x);’>Open google search/div
div class=‘btn’ onclick=‘var x = cordova.InAppBrowser.open(“https://www.google.com”, “_system”); console.log(“x:” + x);’>Open google search/div