Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS platform not working (workaround in issue) #136

Open
yuchengzhong opened this issue Jul 25, 2019 · 5 comments
Open

iOS platform not working (workaround in issue) #136

yuchengzhong opened this issue Jul 25, 2019 · 5 comments
Labels

Comments

@yuchengzhong
Copy link

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^_^

@getnamo
Copy link
Owner

getnamo commented Jul 25, 2019

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

@yuchengzhong
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

@getnamo getnamo changed the title iOS platform not working iOS platform not working (workaround in issue) Sep 5, 2019
@getnamo getnamo mentioned this issue Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants