Ionic not working in iPhone

Hi all,

I am using socket io client lib in my ionic2 app . If i run it on web, it works all right.

However if i install it into my iphone7 plus, it is not working: the code is quite simple:

import * as io from ‘’;

this.url = "http://myserverurl"
this.socket = io(this.url);

this.socket.emit(‘mymessage’, { from: “mobile”);

if i run this on the browser, when i send the message , i can see the socket id and the connected flag is true.

But when install it as an app into iphone7, the log says it is not connected.

i am using this lib:

“”: “^2.0.3”,

Can any one please help. very urgent. thanks.