Objective-c - How does an iOS device know whether the current network is IPV4 or IPV6?
为情所困
为情所困 2017-05-02 09:29:30
0
2
1423

As the title states, the server my device currently accesses is through IP plus port.
This time Apple audits the network that Apple requires to support IPV6.
How to judge in the device? The server needs to be set. ?

为情所困
为情所困

reply all(2)
为情所困

Apple is saying that it must support IPv6-only networks, that is, your app can be used normally even if there is only an IPv6 network.
If the IP address you resolve is in IPv4 format `x.x.x.x`, it will not be accessible under an IPv6-only network.

Share the network on a Mac computer with a network cable, select "NAT64", and then connect to your shared network on the iPhone to establish an IPv6-only network. You can see whether the DNS has changed to IPv6 format in the "Wireless LAN" of the mobile phone settings. You can also test it by visiting http://ipv6-test.com.

After simulating the network environment, run your app to see if the resolved IP is an IPv6 address and whether it can be accessed normally.

Unless there are special needs, it is best not to use IP directly, use domain name.

Peter_Zhu

Just map a domain name and it will be solved. If you write a fixed IPv4 address directly, it will definitely not support IPv6.
There are many ways to check, and Apple all conducts manual review. It should not be difficult to monitor the network communication mechanism of the APP.
But I don’t know exactly how the official does it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template