iOS常用技术 - 本地搭建IPv6测试环境

来源:互联网 发布:java代码生成jar包 编辑:程序博客网 时间:2024/05/17 22:01

苹果要求6月1日后所以提交App store 上架的应用必须兼容Ipv6-only网络服务。检查我们的应用是否兼容就很重要了,官网也给出了检测方法。

https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1 苹果官方文档地址

- 工具

   一台用非Wi-Fi的方式上网的Mac电脑

- 要求

Mac 系统版本 :OS X 10.11

- 实现原理

      使用Mac做一个热点一个本地的IPv6 DNS64/NAT64热点网络,然后用iPhone连接这个Wi-Fi

- 具体步骤 (来自官方文档)

  1. Make sure your Mac is connected to the Internet, but not through Wi-Fi.
    确保你的mac电脑连接了非WiFi 网络

  2. Launch System Preferences from your Dock, LaunchPad, or the Apple menu.
    从Dock、LaunchPad或菜单栏打开系统偏好设置

  3. Press the Option key and click Sharing. Don’t release the Option key yet.
    按住“Option”别放,并点击“Sharing”
    打开分享设置

  4. Select Internet Sharing in the list of sharing services.
    选中左边列表中的 “Internet Sharing ”。
    配置共享网络

  5. Release the Option key.
    释放“option”键

  6. Select the Create NAT64 Network checkbox.
    授权一个本地的Ipv6 NAT64网络

  7. Choose the network interface that provides your Internet connection, such as Thunderbolt Ethernet.
    为你的网络连接选择提供的的网络接口,例如以太网
    选择分享用的网络接口

  8. Select the Wi-Fi checkbox.
    在多选框中,选择 “ WiFi ”
    设置WiFi共享

  9. Click Wi-Fi Options, and configure the network name and security options for your network.
    点击 “wi-fi选项…”,为你的网络配置名称和密码。
    使用wi-fi网络选项

设置本地wi-fi网络选项

10.Select the Internet Sharing checkbox to enable your local network.
使用“互联网共享”,开启网络共享
开启网络共享

11.When prompted to confirm you want to begin sharing, click Start.
当提示确认你想开始共享网络,点击开始。
开始“网络共享”

Once sharing is active, you should see a green status light and a label that says Internet Sharing: On. In the Wi-Fi menu, you will also see a small, faint arrow pointing up, indicating that Internet Sharing is enabled. You now have an IPv6 NAT64 network and can connect to it from other devices in order to test your app.
一旦共享处于活动状态,你应该看到一个绿色的状态指示灯,并且说,Internet共享标签:开。在无线网络菜单中,您还将看到一个小的,淡淡的箭头朝上,表明互联网共享已启用。你现在有一个IPv6 NAT64网络,并可以从其他设备,以测试你的应用程序连接到它。
网络共享指示器

Important: To ensure that testing takes place strictly on the local IPv6 network, make sure your test devices don’t have other active network interfaces. For example, if you are testing with an iOS device, make sure cellular service is disabled so you are only testing over Wi-Fi.
重要提示:为了确保测试发生严把本地IPv6网络上,请确保您的测试设备没有其他活动的网络接口。例如,如果您正在使用iOS设备进行测试,确保蜂窝服务被禁用,所以你只能通过Wi-Fi测试。

PS:简单翻译,自学用之。发现错误,欢迎指出~

0 0
原创粉丝点击