Internal navigation rejected: in Cordova on iOS

后端 未结 5 1264
滥情空心
滥情空心 2020-12-29 18:43

I have built an iOS app using Cordova. The app tries to load a web page e.g. http://yourdomain.com/home in index.html. But, the page stays white blank with error in console

5条回答
  •  情歌与酒
    2020-12-29 19:17

    It's not recommend to open a url in your base web view. Use the cordova-plugin-inappbrowser and call the inappbrowser to open outer url:

    function open_outer_url(url){
        if(window.cordova && window.cordova.InAppBrowser){
            window.cordova.InAppBrowser.open(url, "_blank", 'location=no');
        }else{
            window.open(url,'_blank');
        }
    }
    

提交回复
热议问题