$cordovaInAppBrowser iOS issue


#1

Hi guys,

When I used $cordovaInAppBrowser I kept getting the following error in iOS (iOS7 and iOS9), but it worked fine on Android (Nexus 4 running 4.4 KitKat):

*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> -[__NSCFString charValue]: unrecognized selector sent to instance 0x17d0f400

This is the plugin’s information:

cordova-plugin-inappbrowser 1.0.1 "InAppBrowser"

This was the code I used and the device was ready.

var options = {
        location: 'yes',
        clearcache: 'yes',
        toolbar: 'true'
    };

    $cordovaInAppBrowser.open('http://ngcordova.com', '_blank', options)
        .then(function (event) {
            // success
        })
        .catch(function (event) {
            // error
        });

I did manage to get the in app browser to work in the end using the following code:

window.open('http://ngcordova.com', '_blank', 'location=no&clearcache=true');

I removed the plugin and re-added multiple times; in addition to removing and re-adding the iOS platform, in hope this would resolve it.

Sorry if this has issue been already repeated, but has anyone had a similar issue when using $cordovaInAppBrowser and have they been able to resolve it?

Thanks in advance.


#2

The same issue comes me up too.