I'm just read about Unity for a few days to make a simple game then export to iOS and Android. And as you known, from 1/6/2016 Apple require all app submit to Appstore must be support IPv6 connection.
So if I upgrade my current of Unity to lastest, can I pass this policy?
So if I upgrade my current of Unity to lastest, can I pass this policy?
No. Upgrading Unity will not solve all the IPv6 problems. Although, you still need to upgrade Unity so that some network API with IPv6 bugs will be fixed. If that is done, then you have to go back to your code and manually support IPv6.
If the only network code you used is the WWW
or UnityWebRequest
then you are fine after updating and should ignore the rest of this post.
If you used anything from the Socket
or Net
namespace, then you have to a lot to fix.
Helpful Information from Unity.
1.If you have anything like IPAddress.Any
and IPAddress.Loopback
in your code, you must also support the IPv6 version of those which are IPAddress.IPv6Any
and IPAddress.IPv6Loopback
.
2.IPAddress.AddressFamily
which is usually compared to AddressFamily.InterNetwork
should also have the IPv6 version which is AddressFamily.InterNetworkV6
.
3. Any hard-coded IP Addresses such as the loopback address(127.0.0.1) must be removed. You have to use use the host name or convert host name to ip during run time.
4.If you are using the ping function, remove it for now and implement your own ping function until it is fixed to work with IPv6. It is not fixed last time I checked.
Finally, you can find out if IPv4 or IPv6 is supported by using the function in this question.