IOS device can't connect to server

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
vokial_voc
Posts: 45
Joined: 24 Oct 2013, 14:17

IOS device can't connect to server

Post by vokial_voc »

hi, i made a game with unity targeting IOS and android, and i made the server using smartfox and put it in amazon ec2, everything working fine when we test it in our place, but when we released the game, i got many people report that they can't connect to the server, and all the report are from IOS device not from the android, even some of the user report that they have both android and IOS, but only the ios can't connect.

i'm trying to figured out what the problem, but still no luck, when i test with with our IOSdevice, IOS 6 and 7, all working fine, so i doesn't know how to identify the problem,
any idea what happening to the IOS device?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: IOS device can't connect to server

Post by Lapo »

Unfortunately I have no idea as well. I find it strange that you can test it and it works but others can't.
I think you should gather more information and possibly find someone or some device where the problem is reproducible.

A few ideas might be that the User has a bad connection or that their carrier does not allow TCP connections? I would find the latter a little surprising for a smart phone, but I have also heard all kinds of strange limitations from various users.

Maybe you should investigate if there's a specific carrier that is causing problems. If not we can drop the idea and look for other causes.
Lapo
--
gotoAndPlay()
...addicted to flash games
vokial_voc
Posts: 45
Joined: 24 Oct 2013, 14:17

Re: IOS device can't connect to server

Post by vokial_voc »

thanks Lapo for quick response. right now i'm using smartfox 2x v 2.7 for server and c# api 1.3 for client.

i also confused because on our IOS device always can connect to server, and for bad connection i think it is not the cause, since their internet connection is faster than mine, ( i'm in indonesia, and some user that report can't connect are in korea), they also can play other game and some social media like facebook and kakao talk in the same time, only my game that can't connect.

right now the only possible solutions i found is to enable "Requires Presistant WIFI" in unity IOS player setting, and i will update the information latter if it working or not after apple approve my update game version.

if you have any other suggestion, please let me know
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: IOS device can't connect to server

Post by Lapo »

I would investigate the possibility that some Korean mobile phone carrier might not support socket connections or, more likely, they just allow certain TCP port ranges.
If that's the case you could add an extra TCP port listener to your server to allow those users to connect as well.
Lapo
--
gotoAndPlay()
...addicted to flash games
vokial_voc
Posts: 45
Joined: 24 Oct 2013, 14:17

Re: IOS device can't connect to server

Post by vokial_voc »

any suggestion what TCP port should i use so i won't be blocked by provider?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: IOS device can't connect to server

Post by Lapo »

Some ports like 80 (HTTP), 443 (HTTPS) are very unlikely to be blocked by any carrier.

For maximum reachability we often times recommend to run the TCP listener on port 443 and the BlueBox on port 80. This is the best configuration to defeat firewalls, proxies and other network limitations.

NOTE: if you are running on Linux/Unix you will need to run the server as root, since binding any TCP/UDP port < 1024 requires root privileges.

Hope it helps.
Lapo
--
gotoAndPlay()
...addicted to flash games
vokial_voc
Posts: 45
Joined: 24 Oct 2013, 14:17

Re: IOS device can't connect to server

Post by vokial_voc »

how to change the bluebox port? i don't see it in admin tool.

do you mean run server as root is to change the server directories and files into root and start the server using root account?
if i install server as daemon ( i followed the documentation) , when my server reboot it will also run as root? thanks
Post Reply