0
votes

In order to be able to submit again to the app store (for a published game) we had to make things work for IPv6. So we updated Unity to the version 5.3.5p2 (latest patched version available)

We went through reworking all our networking interfaces (we used to use classic http requests for backend server com and socket connections for asset download) we swapped everything with UnityWebRequest, DownloadHandler and UploadHandler from UnityEngine.Experimental.Networking

Everything works fine on Editor and android but for iOS it just ... crashes.

We are using : Unity 5.3.5p2 xCode 7.2 and iPad2 with iOS 9.3.2 Build settings : IL2CPP Universal Architecture (min iOS 7.1) API Level .Net 2.0 Strip Engine code set to OFF AOT-Compile options set to : mint-trampoline 512 (we were using this for mono scripting backend) On Xcode : Bitcode is disabled optimisation level set to (for release and debug) : None[-O0] Here is the error we get on console when the game runs :

Unable to find method GetProgress in [UnityEngine.dll]UnityEngine.Experimental.Networking.DownloadHandler . . Unable to find method ReceiveContentLength in [UnityEngine.dll]UnityEngine.Experimental.Networking.DownloadHandler . . [project name] was compiled with optimization - stepping may behave oddly; variables may not be available.

(we very simply implemented the DownloadHandlerScript with a managed static buffer)

When we build with mono as scripting backend things work fine. But IL2CPP is mandatory for us. Thank you for your help.

2

2 Answers

0
votes

When we build with mono as scripting backend things work fine. But IL2CPP is mandatory for us.

It is very likely that a function you are calling from UnityWebRequest is not yet implemented in the IL2CPP side or that is a plain bug.

Notice that you are using UnityWebRequest from UnityEngine.Experimental namespace which is clearly an experimental version of UnityWebRequest that is not yet mature. You need to download the latest version of Unity which is Unity 5.4. In 5.4, UnityWebRequest is moved to UnityEngine.Networking namespace and more bugs were fixed in that new release. Download Unity's 5.4.0b21 here.

If that doesn't work, use the Unity WWW API instead of UnityWebRequest. It is IPv6 safe in >= 5.3 versions. Also file for bug report if UnityWebRequest didn't work after updating Unity to 5.4.

0
votes

This is likely an issue with managed code stripping. I've posted a possible work around on the Unity forums here:

http://forum.unity3d.com/threads/unity-ios-and-ipv6-support.404938/#post-2670944