IPv6 for Unity iOS Exports

TobiasTobias admin
Apple now requires iOS apps to support pure IPv6 connections.
We tested PUN v1.75 and it supports IPv6, including the "Best Region" setting.

If you use the Photon Cloud, you only have to make sure your PUN version is up to date.
If you run a Photon Server, you need to use a recent 4.x server.

Test All Builds

Unity's support for IPv6 begins with 5.3.4p4. They posted about adding IPv6 support.

Several versions of Unity do not successfully support IPv6, so you should test each build.

If you get a client-side error like this, your client needs an update;
Connect() to 'x.x.x.x' failed: System.Net.Sockets.SocketException: Network is unreachable in a IPv6 network.

Test Procedure

Read "Test for IPv6 DNS64/NAT64 Compatibility Regularly" to learn how to test IPv6 support easily.

We do this for PUN before release.
Make sure there is not some other plugin failing!

Handling Rejections

We know that some apps got rejected, despite using PUN v1.75 or newer.

If your app gets rejected, please get in touch with the Apple review team. Point out that you're using PUN and that we and you both tested the networkcode versus their own test procedures.

Explicitly point to their own test-description page.

Apple suggests:
If the iOS application is successful in working across the macOS NAT64 test environment, then the next step is to submit a bug report. We ask developers to use the Apple Developer Bug Report web page - http://bugreport.apple.com to submit the bug report. The bug report is to indicate that there is some compatibility issue between the app and the App Review test environment. In the bug report, the developer provides evidence that the iOS application worked successfully across the macOS NAT64 test environment by including a packet trace to show the success of the connection process.

Note that the bug report is not an indication as to where the problem lies, but the fact that the iOS app works in the test environment and not in App Review is an indication that the app / App Review interaction needs further review. Once the bug report is submitted, there issue is then assigned to investigation by an App Review group. Once a bug report is assigned to App Review, the next thing is to follow up with the bug report by communication with App Review - “appreview@apple.com”. While the email inquiries may not always get a response - all of the correspondence is viewed.

Cloud and Server

The Photon Cloud can not provide public IPv6 addresses in the short term. However, Apple's requirement is only that clients can cope with IPv6 addresses in their network, if that provides "IP translation", as described in their article.

For anyone using Photon Server (OnPremise), this means, you can likely continue to run it as IPv4 service.
If you want to setup a true IPv6 server, we have some docs for that.



Get Photon Unity Networking in the Asset Store.
«134

Comments

  • Do you know about this problem ? Looks like photon can't ping IPv6 servers.

    http://forum.photonengine.com/discussion/7835/ipv6-troubleshooting#latest

    Thanks
    Martin
  • Hi
    i use Photon Realtime as server and the last unity photon plugin
    today i get rejected from apple because IPv6
    what should i do!?
  • Hi @Moh97,

    Please read the IPv6 guides carefully, they should contain all the information you need:
    Photon Server IPv6 Guide
    PUN IPv6 Guide
    Photon Realtime IPv6 Guide
  • Please note that Unity 5.4.0f3 (the release) does not support IPv6.
    In the release notes of patch 5.4.0p1, we find: "(807653) IL2CPP: Fixed IPEndPoint on IPv6 network.".
    Get 5.4.0p1 here.
  • We got several reports of apps being rejected from the App Store.

    I was looking for new requirements from apple and didn't find any. So, as long as you followed the instructions above, your app should be fine and pass.

    What I found is, that a few other developers also failed to pass through IPv6 checks and they resubmitted or escalated the cases. After some back and forth, their apps went through certification - often without changes!

    Some hint that Apple's testing is currently not deterministic (to put it nicely):
    https://forums.developer.apple.com/message/145301#145301
    https://forums.developer.apple.com/thread/48170#48170
  • Hi I use Unity 5.4.0p1 and photon PNU 1.74 however when I test ipv6 from my mac it can not connect to server, not sure what parameters I have to use.
  • This is stated in Xcode:
    Connect() to '184.173.132.27' failed: System.Net.Sockets.SocketException: Network is unreachable
    at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in :0
    at ExitGames.Client.Photon.SocketTcp.DnsAndConnect () [0x00000] in :0
    ExitGames.Client.Photon.SocketTcp:DnsAndConnect()
  • Shame on me! I found there is a bug with IPv6 support in PUN v1.74.
    It's fixed and we will release it asap. Tomorrow it should be available.
    Thanks for reporting this.
  • v1.75 should be available in the next two hours.
  • Hello. Using Unity 5.4.0p2 and PUN v1.75 I have the same issue as described above. Do I need to update the photon server as well to allow the IPv6 support or am I missing something? Thanks in advance.

    Error message in Xcode:
    Connect() to '54.200.80.183' (InterNetwork) failed: System.Net.Sockets.SocketException: Network is unreachable
    at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in :0
    at ExitGames.Client.Photon.SocketUdp.DnsAndConnect () [0x00000] in :0
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    ExitGames.Client.Photon.SocketUdp:DnsAndConnect()
  • You need to have DNS entries for all servers and set the Hostname for each. Make sure you have the minimum required server version for this.
    Once setup, the client will get hostnames instead of IPs. Then it can resolve that name to a IP and connect.

    Use this guide to setup a server:
    http://doc.photonengine.com/en-us/onpremise/current/operations/ipv6
  • Thanks! Everything works like a charm now.
  • TobiasTobias admin
    edited August 2016
    Thanks for letting us know!
  • Thanks it work now
  • Using PUN 1.75 and Unity 5.4.0p3 and Apple is rejecting my app for IPV6 compatibility. Works on NAT64 and IPV4 networks but not on whatever they're using. Any suggestions for what to look for in order to ensure it works for them? I've read the IPV6 pages and nothing jumps out as something I've done differently.

    Thanks!
  • @SMartin, so you did test with the NAT64, as described by Apple? And that worked?
    If you still get rejected for IPv6 issues, we don't know what the problem is. We tested their setup and it worked fine.

    Are you using any other plugins?
  • I updated the initial post. It's hopefully more clear how to react and we hope we can figure out what causes the rejects.
  • Hey Tobias,

    I updated my submission to include your suggestions above and they approved the same binary they'd previously rejected. It does pass the NAT64 test when I test it on my own but I can see in the logs I gather that they have problems getting into a multiplayer match... so, I'm not sure what/why... but they seem to at least be aware that a problem exists.
  • Hello guys!

    I use Unity 5.4.0p1 and PUN 1.75 and Apple declines my app. I use Api Compatibility level - .NET 2.0 and some other plugins. Guys whose review was successful? What did you do for it?
  • @Carter, I updated the first post in this thread for help and info. As you can see in the post above yours, SMartin's game was first rejected and then got accepted after pointing out that it was in fact tested against Apple's own guide.

    If you tested, please get in touch with the reviewer crew and let them know. If possible, update us later on.
  • Hi Tobias!
    As you say, I should sent the app on the review again pointing out that I have tested it according their guide?
  • KevinBKevinB
    edited September 2016
    here's my experience of App rejection with the Apple App Review team

    I am using 4.1.3.3 native C++ sdk instead of PUN. i am having the same issue that our app passed our own IPv6 test according to Apple's own guide. However, App Review test keeps failing. App Review team can connect to our lobby server but failed to connect to game server when joining a game room.

    once you get the rejection, as long as you appeal and point out that you have tested according to Apple's IPv6 page, then they will approve it even though the 2nd time testing will still fail for them.

    The app will be approved, however it means ur app will take extra time to get approved. and because of the IPv6 issue, all your software update will be rejected, then appeal, then approved. we have submitted 2 subsequent software updates, all of them are first rejected due to IPv6 issue, and then later approved after we appeal.

    This is quite annoying going forward. I am currently working with a Apple Developer Technical Support to try to get this issue sorted out. He recommended us to file a bug report against App Review, and attach Wireshark packet trace to show that our own testings are indeed passed in IPv6 environment.

    if I have any updates, will post more.

    K

  • TobiasTobias admin
    edited September 2016
    @KevinB: Thanks for the info! This is really annoying and a waste of time.
    Very cool you are trying to figure out why and how things fail for them. We and a lot of other developers test with Apple's setup and we can't get why they fail.

    @Carter: Yes.
  • Hi, IPV6 not work. I'm using the latest version. Apple today was rejected again.

    Apple message.
    " As we discussed, it would be appropriate to revise your app and make sure it supports IPv6 networks and that the IAP products are implemented correctly.
    We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 9.3.5 on Wi-Fi connected to an IPv6 network.

    We've attached screenshot(s) for your reference. "


  • I sent IPA (unity version 5.4.0p1, pun version 1.74) a week ago with an appeal. It was on review for a week and still got rejected :confused:
    Tobias said:

    @KevinB: Thanks for the info! This is really annoying and a waste of time.
    Very cool you are trying to figure out why and how things fail for them. We and a lot of other developers test with Apple's setup and we can't get why they fail.

    @Carter: Yes.

  • Tobias said:

    @KevinB: Thanks for the info! This is really annoying and a waste of time.
    Very cool you are trying to figure out why and how things fail for them. We and a lot of other developers test with Apple's setup and we can't get why they fail.

    @Carter: Yes.

    Hi, What is the current situation?
    Apple rejected continue....
  • @musakara, @Carter: Did you test with the setup Apple described on their page?

    Did that work? Did you point them out to this fact and did you ask which other test procedures you need to run to pass?

    At the moment, we don't know why they reject apps.
  • @Tobias: I can not do it with the mac mini :confused:
  • There are adapters, afaik. You need to test, because some Unity versions got broken IPv6 support. You'll never know if you get rejected for a reason without testing.
  • @Tobias: But did you test 5.4.0p1 version, or not?
Sign In or Register to comment.