简体   繁体   中英

Open system browser on load cordova

I have a Cordova application, which just opens a browser and load a mobile first website. I'm using it to initialize Push notifications. I'm using inAppbrowser. I would like to open the system browser (like Safari) instead of inApp browser. Here is my code :

var app = {
    initialize: function() {
        document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
    },
    onDeviceReady: function() {

        cordova.InAppBrowser.open('example.com','_system');
    },
    receivedEvent: function(id) {

        console.log('Received Event: ' + id);
    }
};

Even with the param '_system', Safari isn't launched.

Is there any way to open the default browser ?

Thanks

使用cordova-plugin-inappbrowser,我使用“_blank”在iOS上打开safari。

window.open(uri, "_blank");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM