Support for Unity 2019 in GameLift Realtime Client SDK

The Mega Frog Race demo project builds and plays on iOS and Android with an IL2CPP build and unity 2018.4
With a unity 2019.4 IL2CPP build Android still works but iOS freezes at the moment it should connect.
Specifically the line that it breaks on is in RTSClient.cs
_client.Connect(string.IsNullOrEmpty(ipAddr) ? DEFAULT_ENDPOINT : ipAddr, port, UDPListenPort, token);

On this page https://aws.amazon.com/gamelift/getting-started/
It does say “can be used with Unity 2018”. So I’m wondering if official support for 2019 is in works?

Also, we are currently trying to figure out what exactly caused this changed behaviour between the two versions.

An earlier line in RTSClient
ClientConfiguration clientConfiguration = ClientConfiguration.Default();
gives us a warning
CS0618: ‘ClientConfiguration.Default()’ is obsolete: ‘This connection is unsecured! Prefer a secured ConnectionType instead! Note, secure connection establishment requires the Realtime server to contain generated certificates. Refer to AWS Gamelift documentations for creating a certificate-enabled Script fleet.’
So it could be that unsecured connections were allowed on iOS with 2018 builds but not with 2019?

2 Likes

Am going to reach out to the GameLift service team to see if they have any information/updates

Apple does block unsecured connections in iOS 9 and up so I wonder if Unity 2019 is built against a more modern version of the iOS SDK: https://developer.apple.com/documentation/security/preventing_insecure_network_connections

As Realtime can use the free GameLift TLS certs for its fleets, have you tried flipping to TLS based connections?

Hey Andrew, I work for a studio that’s been using GameLift for almost a year now. Unfortunately, this is a bug related to the Realtime Native being generated using SWIG, which doesn’t support IL2CPP and requires some handling with MonoPInvoke callbacks. As to my knowledge, this is something the gamelift realtime team is still working on. However, it seems the team doesn’t have in-house iOS devices and tests on Simulators, which has been slowing down progress on verifying a solution.