-
Notifications
You must be signed in to change notification settings - Fork 65
Getting Accepted on the Apple App Store
Recently iOS games using DR have had issues getting accepted on the Apple App Store due to an inability to connect to the server. There's some speculation that this is caused by Apple's teams working from home and over a VPN that does not support UDP or a recent change to their firewall. The issue only appears during the approval process and has not yet been acknowledged by Apple.
From DR users's personal finding (please tag yourself for credit here David!), only inbound traffic is blocked while outgoing UDP traffic is fine.
The issue affects DarkRift's default Bichannel Listener as it makes use of UDP for unreliable packets but will affect any UDP based network listeners. Therefore the easiest solution is to switch to a network listener that is solely TCP based such as this websockets listener. Unfortunately the Bichannel Listener always sends a UDP packet to the client during its handshake so it is not possible to avoid the issue by only using the Reliable channel.
If UDP traffic is necessary for your game, it is possible to get accepted by primarily using a UDP based listener (UDP is fine on iOS devices, it's just during approval it does not work) and switch to a TCP based listener if the UDP listener cannot connect. A DR server can be configured with multiple network listeners transparently to plugins, so no server-side code changes need to be made, but the fallback logic will need to be added client side.
There are plans to add a built in TCP only listener to DarkRift in the near future and this article will be updated if that happens.
Once approved, Apple seem to be much more lax on accepting apps so it may be possible to get updates approved even if they cannot connect during testing.
An additional issue currently seen on iOS devices (often as a symptom of the above) is a System.Net.Sockets.SocketException (0x80004005): Operation on non-blocking socket would block
during connection with the Bichannel Listener.
This is caused when the socket times out while waiting for the inbound TCP or UDP packets during the handshake (one would normally expect the exception to mention the time out as it does on every other platform!) This is usually seen during the app store approval process because the UDP packet is obviously blocked but can occur outside the app store approval process if the handshake is interrupted.