- Home /
Unity 5.0.1f1: iOS client to Linux server RPC silent failure
Hey all,
I've got a simple server running as a headless Linux standalone program. It just does some simple authentication and retrieves some data from a MySQL database. The client program is part of the same Unity project. That is to say, one scene is the server program and a different scene is the client program. There is a whole host of DLLs responsible for cryptography and MySQL communications, and those DLLs are specifically excluded from the client build, which doesn't require them.
The Linux server runs fine, and the client is fine too. We can connect to the server and perform all required functions without any problems in both the editor and in various standalone builds.
It's entirely RPC-based, there is no state synchronization.
On iOS however, the client program sends RPC calls to the Linux server, but the server never receives them. There is no error, the client program sits around and patiently waits for a response which will never come.
I thought maybe it was because the server used NAT punchthrough on initialization, but the iOS client can connect and report a successful connection. It just can't use the RPC calls.
I'm really not sure what else could be causing the issue. There doesn't seem to be a timeout issue, it stays connected until I close the app myself, and this is verified in both the client and server logs.
[Edited this section out; it is no longer telling me that we don't have the iOS Pro license. I don't think I did anything to cause this to be corrected.]
Anyway, it would be really nice if we could get these RPC calls working on iOS as they do on every other version we build in. Since no error or anything is being thrown, I don't seem to have any way to tell what's happening to the RPC call. Is there some diagnostic method I could use to trace an RPC call that is not reporting any problems? Is there some known issue with iOS RPC calls that I'm not aware of? I trawled Unity Answers and the forums and couldn't find anything like this happening.
Let me know if I need to include more information, and thanks!
Just for the sake of information, our scripting backend is IL2CPP, and we're using the IL2CPP precompiled header. We do not require persistent WiFi. Our iOS architecture is Universal. API Compatibility Level is .NET 2.0. Target iOS version is 6.0. Stripping is disabled. Script call optimization is slow and safe.
Earlier, I noticed that the machine we were building on was clai$$anonymous$$g we didn't have iOS pro on the build settings page. I revoked the license and then re-used the same serial number, and that message went away. It didn't solve this problem, though.
Answer by MultivariousDev01 · Apr 21, 2015 at 06:18 PM
From the "Upgrading to 64-bit iOS" page in the Unity Manual:
The UnityEngine.Network APIs are currently not supported for IL2CPP builds.
And indeed, building in mono 2.x mode resolves the issue.
I hope the lack of the Network API gets fixed soon!