I have this code on my cordova application, with the InAppBrowser plugin, to open an external network
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');
});
}
},
It works fine in android, but on iOS, I get this error:
Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
I checked all the other stackoverflow related questions, but nobody seems to be correct ...
Any help or hint?
source
share