Hello all,
I’m developing for iOS for the first time and I’m with trouble when calling my API using a post request and trying to open a browser.
@Error1:
The post request is odd, in device it work if I use my DNS (it’s a self signed certificate) but doesn’t work when I use the direct IP address. But both ways work when I test using “ionic serve -l”.
When trying the direct IP address the request return the status 0, here is my code:
var ip = "172.1.1.2";
var link = 'https://'+ip+':9090/api/ping';
var request = new XMLHttpRequest();
request.open("POST", link, true);
request.timeout = 2000;
request.onreadystatechange = function (oEvent) {
if (request.readyState === 4) {
alert("Status:"+request.status);
....
I have already put this in my iconfig.xml, but nothing changed:
<allow-navigation href="*" />
@Error2:
When I try to open a navigation tab, wich contains a “howto” on our website, in “ionic serve -l” it works fine, but in iOS device it simply don’t do nothing:
//window.open("http://www.example.com.br/callback/");
this.iab.create('http://www.example.com.br/callback/', '_system', 'location=yes');
I tryed with window.open (it worked in android) but then I installed the plugin InAppBrowser, but no success.
Thanks in advance.