最近在将自己的ios程序发布到app store, 其中遇到不少坑, 这里记录一下关于app 的纯ipv6环境下网络访问的问题。
问题描述:
Guideline 2.1 - Performance - App Completeness
We discovered one or more bugs in your app when reviewed on iPad running iOS 11.2 on Wi-Fi connected to an IPv6 network.
Specifically, we were unable to login during the review.
Please see attached screenshots for details.
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.
首先国内的很多服务器都还停留在ipv4的基础上,对于ipv6的普及仍然还需要很长时间,就像之前的iOS http请求与iOS https请求,好了不说这些,总之普及需要很多时间。
直接说解决方案吧:
1、折腾服务器吧,有钱的话,你可以任性的购买ipv6服务器。或者用方法2。
2、如果你代码中访问服务器的地址是ip地址,如@“http://10.102.26.12:8080”,那么, 请为你的服务器配置一个域名就ok了。类似于"www.xxxx.xxx.com/interface"就能解决。
实际上,苹果对这块并不是查的很严,毕竟国内好多应用服务器都不具备ipv6的条件,一般他们遇到请求访问不到的时候,会判定为ipv6的原因。
网友评论