Apple明文规定所有开发者在6月1号以后提交新版本需要支持IPV6-Only的网络，如果ipv6测试不通过，苹果会直接拒审，因为项目太老，所以这次升级送审持续了两个月，估计以后不会再碰到这种问题了，毕竟如果不是公司要求，其实这个已经被淘汰了。

## 一、APP应用修改

If you’re writing a client-side app using high-level networking APIs such as NSURLSession and the CFNetwork frameworks and you connect by name, you should not need to change anything for your app to work with IPv6 addresses. If you aren’t connecting by name, you probably should be. See Avoid Resolving DNS Names Before Connecting to a Host to learn how. For information on CFNetwork, see CFNetwork Framework Reference.

If you’re writing a server-side app or other low-level networking app, you need to make sure your socket code works correctly with both IPv4 and IPv6 addresses. Refer to RFC4038: Application Aspects of IPv6 Transition.

## 二、cocos2d-x 2.x版本版本修改

Cocos2d-x Developer

Hi all,

The status of this task is:

• it is finished for v3
• v2 is fixed except of windows and wp8, has compiling error on these two platforms because of upgrading libwebsockets. Will support them ASAP.

How to do

You can just update?libwebsockets?and?CURL?like this:

• modify?Cocos2d-x root/external/config.json?to update the dependency version. For v3.x the dependency version is?v3-deps-94, and for v2.x it is?v2-deps-6

Edit: i also modify?Console?and?ScriptingCore?to support IPv6-only network in?this PR?, but i think it is not needed for you to do like this because they are just for testing, not be used in game logic.

If you are using v2.x, you also need to apply?this commit?to fix compiling error.

Edit: windows compiling issue of v2 is fixed, you need to download?v2-deps-v7?instead if you work on windows. And you may need to link?ws2_32.lib?in libexternal project. Refer to?this commit?for detail information.

## 三、检查服务器是否支持ipv6

dig?dnspod.cn?aaaa

## 四、设置本地ipv6网络测试app

ipv6的设置方式可以按照这个文章设置《【指南】本地如何搭建IPv6环境测试你的APP》，设置完成之后，先打开safari网页连接下百度试试，如果能打开百度，说明设置正确可以开始测试app了，如果网页打不开，说明没有正确创建，可以重新创建或者重启下电脑重新创建。

## 五、提审如果被拒的应对方案

1、检查本地的网络和机型，看是否因为某种机型的问题，或者你游戏服务器的状况是否能在国外链接的上（几率比较小，并且重新完整替换网络库，依旧被拒绝）