IOS提交App Store IPV6被拒

原邮件内容如下

We discovered one or more bugs in your app when reviewed on iPad running iOS 12.1 on Wi-Fi.

Specifically, we were unable to access to your app.

Next Steps

To resolve this issue, please run your app on a device to identify any issues, then revise and resubmit your app for review.

If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.

For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce the issue. For updates, install the new version as an update to the previous version, then follow the steps to reproduce the issue.

Resources

For information about testing your app and preparing it for review, please see Technical Note TN2431: App Testing Guide

For a networking overview, please review About Networking. For a more specific overview of App Review’s IPv6 requirements, please review the IPv6 and App Review discussion on the Apple Developer Forum.

Please see attached screenshots for details.

并附带两张游戏无法登陆的截图

以上红字可以看出是因为App为支持ipv6环境

一下是客户端连接服务器代码,可以看出做过IPv4/ipv6的处理,问题出在了服务器端,跟服务端沟通过后发现问题在于服务端未做过适配ipv6处理。

  /// <summary>
    /// 连接服务器
    /// </summary>
    void ConnectServer(string host, int port) {
        client = null;
        try {
            IPAddress[] address = Dns.GetHostAddresses(host);
            if (address.Length == 0) {
                return;
            }
            if (address[0].AddressFamily == AddressFamily.InterNetworkV6) {
                client = new TcpClient(AddressFamily.InterNetworkV6);
            }
            else {
                client = new TcpClient(AddressFamily.InterNetwork);
            }
            client.SendTimeout = 1000;
            client.ReceiveTimeout = 1000;
            client.NoDelay = true;
            client.BeginConnect(host, port, new AsyncCallback(OnConnect), null);
        } catch (Exception e) {
            Close(); Debug.LogError(e.Message);
        }
    }

服务端兼容ipv6后还是出现连接不到服务器,现象是当给客户端链接ip(**.**.**.**)地址的时候链接失败,换成域名(http//test.**.com)后链接成功,以下是个人分析。附带ipv6链接示意图

ios在ipv6环境下会优先解析ipv6地址,当给他ipv4地址的时候无法解析成ipv6地址,当给他域名的时候,他会用上图中的DNS sever将域名包装成ipv6。

猜你喜欢

转载自blog.csdn.net/Happy_zailing/article/details/83902878