SocketIOClient-Unreal icon indicating copy to clipboard operation
SocketIOClient-Unreal copied to clipboard

iOS platform not working (workaround in issue)

Open yuchengzhong opened this issue 5 years ago • 5 comments

I connect to my own server using ip address like "http://0.0.0.0:0" and it worked in windows. In the case of iOS platform,though I check the "Allow web connection to non-https websites",it doesnt work on my iphone(ios 11). I tired to add plist: <key>0.0.0.0(my server ip address)</key> <dict> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSExceptionRequiresForwardSecrecy</key> <false/> <key>NSIncludesSubdomains</key> <true/> </dict> should I use a domain name to connect to my server? if so what should I do? Or there's other problem causing this issue. Looking for help. Thanks^_^

yuchengzhong avatar Jul 25 '19 16:07 yuchengzhong

0.0.0.0 is not a valid server ip. Lookup your laptop/pc or whatever is hosting your service IP. It can be the local network ip e.g. 192.168.x.x or 10.0.x.x if you are on the same wifi, otherwise you'll need the public host IP or domain name if you own one.

so e.g. if you were on the 192.168 local domain and your hosting laptop has an ip of 192.168.1.2 you could connect via

http://192.168.1.2:3000

if you use the default port 3000 as used in the chat example: https://github.com/getnamo/socketio-client-ue4-example/blob/master/server/index.js

getnamo avatar Jul 25 '19 20:07 getnamo

0.0.0.0 is not a valid server ip. Lookup your laptop/pc or whatever is hosting your service IP. It can be the local network ip e.g. 192.168.x.x or 10.0.x.x if you are on the same wifi, otherwise you'll need the public host IP or domain name if you own one.

so e.g. if you were on the 192.168 local domain and your hosting laptop has an ip of 192.168.1.2 you could connect via

http://192.168.1.2:3000

if you use the default port 3000 as used in the chat example: https://github.com/getnamo/socketio-client-ue4-example/blob/master/server/index.js

No I just use 0.0.0.0 to cover my server real ip. Actually it does connect to my own server,on windows plaform.

yuchengzhong avatar Jul 26 '19 04:07 yuchengzhong

0.0.0.0 is not a valid server ip. Lookup your laptop/pc or whatever is hosting your service IP. It can be the local network ip e.g. 192.168.x.x or 10.0.x.x if you are on the same wifi, otherwise you'll need the public host IP or domain name if you own one.

so e.g. if you were on the 192.168 local domain and your hosting laptop has an ip of 192.168.1.2 you could connect via

http://192.168.1.2:3000

if you use the default port 3000 as used in the chat example: https://github.com/getnamo/socketio-client-ue4-example/blob/master/server/index.js

1231312 But it doesnt work on iOS. And I tried to print the ip address of the COMPONENT: 123141132132 BUT ON IOS: QQ图片20190726131224 The ip address just gone with no reason QAQ Here's the blueprint: QQ图片20190726131327

yuchengzhong avatar Jul 26 '19 04:07 yuchengzhong

0.0.0.0 is not a valid server ip. Lookup your laptop/pc or whatever is hosting your service IP. It can be the local network ip e.g. 192.168.x.x or 10.0.x.x if you are on the same wifi, otherwise you'll need the public host IP or domain name if you own one.

so e.g. if you were on the 192.168 local domain and your hosting laptop has an ip of 192.168.1.2 you could connect via

http://192.168.1.2:3000

if you use the default port 3000 as used in the chat example: https://github.com/getnamo/socketio-client-ue4-example/blob/master/server/index.js

And here's my plist: 123141132132 Actually im using VaRest to and also use ip adress to PUT or GET,and http request works fine. The same ip adress,when it comes to SocketIO silent ,it only work on Windows platform. This makes me confused.It will be appreciated if you have any good idea.Thanks.^_^ @getnamo

yuchengzhong avatar Jul 26 '19 04:07 yuchengzhong

Ok I think I got this work. First,using http no need to enter ipv4 adress.But its different in socket. So you need to convert your ipv4 ip into ipv6 : https://www.ultratools.com/tools/ipv4toipv6Result?address=0.0.0.0&as_sfid=AAAAAAUnIHcpu90_nFakFLCnZuBx8krdMzYg1kEEhyzCy3f64w66hTMk-TcPj8Pcgk2Z9_apCnp4l0XxyYDzU_HO_QG1PaEGuQf1_D3bCGCx8JcDWwmwKhzC6uEzpJ7G3dy83dI%3D&as_fid=eab255bd5ee79d5bc01c6be282857df96697e89a

And in ue4 you should write like this: http://[0:0:0:0:0:ffff:0:0]:8888 8888 is your port. And this works,no need additional plist. @getnamo

yuchengzhong avatar Jul 26 '19 07:07 yuchengzhong