我在我的cordova应用程序上有这个代码,使用InAppBrowser插件打开外部网站
onDeviceReady: function() {
app.receivedEvent('deviceready');
if(PushbotsPlugin.isAndroid()){
PushbotsPlugin.initializeAndroid("XXXX", "YYYYY");
PushbotsPlugin.getToken(function(token){
var url="http://subdomain.domain.com/deviceid/" + token + '/platform/1';
document.getElementById("ge").addEventListener("click", irekiAndroid(url), false);
var ref = window.open(url, '_blank','location=no');
});
}
if(PushbotsPlugin.isiOS()){
PushbotsPlugin.initializeiOS("XXXXX");
PushbotsPlugin.getToken(function(token){
var url="http://subdomain.domain.com/deviceid/"+ token + '/platform/0';
document.getElementById("ge").addEventListener("click", irekiIOS(url), false);
window.open(url, '_self','location=yes');
});
}
},
在android中它的效果很好,但在iOS中我收到了这个错误:
Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
我检查了所有其他stackoverflow问题,但似乎没有人正确...
任何帮助或线索?