iOS devices, ARM64 and dedicated server connection issues

Hi guys, our team is working in a multiplayer project with compatibility with Android and iOS devices and we’re found a problem.

The issue is related with the ARMV7 / ARM64 architectures, we noticed that is not a new thing as is described next:

Sorting, some iOS devices (the ones with AMR64 architecture we assume) are unable to connect to our dedicated server running in a windows machine. This issue is not present in Android devices or Windows machines.

If we package the project including ARM64 the game does not connect to the dedicated server, it just work with ARMV7, this is not an issue while testing, but the problem is that Apple does not accept packages with ARMV7 (32 bits) anymore, so we’re forced to use ARM64.

We already try everything in our hands without results, any idea how to proceed?. We’re close to a alpha test and this is very problematic for us.

Additional information:

  • Unreal engine version: UE4.14.3 Source.
  • Apple test device: IPAD Model MD789LL / A.
  • Android test devices: Samsung Galaxy Note 5, Samsung Galaxy Note 3, Samsung Galaxy SIII.

Hello HDardis,

Thank you for reporting this problem. I’m currently investigating this connection issue and one of our iOS developers believes that he has already made a change to fix this but it’s not quite available on Github yet. Once the change is available, I’ll update here so that you can try grabbing the build with this change and see if it fixes the issue for you. If that fails, I’ll see if I can get a local reproduction of the issue and have a bug report entered.

Thanks a lot Matt!, is very good to know, we have some scheduled deliveries so we’re in trouble. We will be attentive to your response.

It doesn’t seem like the fix will be put into Main in the immediate future so I’m going to just post the change that they believe will fix the issue. Please take this into your build and see if it helps.

In Engine/Source/Runtime/Sockets/Private/IOS/SocketSubsystemIOS.cpp:

Line #107 (should be Line #104 in 4.14)

Change from:

WifiAddress = ((sockaddr_in*)Travel->ifa_addr)->sin_addr.s_addr;

to:

WifiAddress = ntohl(((sockaddr_in*)Travel->ifa_addr)->sin_addr.s_addr);

Line #139 (should be Line #136 in 4.14)

Move the following line to the next line:

return HostAddr;

Add the following on the aforementioned line:

bCanBindAll = true;

If the change cause the engine not to compile, please keep in mind that this change was made with 4.15 in mind and may require an update to compile correctly. This should be a standalone and compile successfully however.

Please let me know the results when you get to try this.

Hey Matt!, there are really good news!, we already tested the fix in a developer build (arm64 ofc) and it works!, we’re about to perform a shipping build, ill post our results soon.

It works like a charm!, Thank you so much!

This might be digging out dead topic, but - we’ve had simillar issue and we’ve discovered that the binding has quite a big issue.
Here’s the pull request fixing it: .com/EpicGames/UnrealEngine/pull/4395

im on unreal 4.27.2 and my ios cant connect to my windows dedicated server, do I need to do all this still or did unreal fix it?

anyone out there?

anyone out there know?

any updates? Also having issues