On WWDC2015 Apple announced that iOS9 will support pure IPV6 Web services. At the beginning of 2016 all apps submitted to the App Store must support IPV6. To ensure that existing applications are compatible, we need to be aware of the following points.
Using the underlying network API is not recommended
There are no compatibility issues with these APIs in the blue part of the show, and most of the APIs we use for ourselves include those of third-party web libraries.
Networking Frameworks and API layers
In most cases, we use the Advanced API to fully realize our needs, and the Advanced API package is very easy to use, and many of the bottom-level IPv6-like work has been done for us. And with the underlying API there will be a lot of work for us to do, more prone to bug. But if you do need to use the underlying POSIX socket API, refer to this rfc4038:application aspects of IPV6 transition guidance.
Do not use IP address
For example, the following api,nodename this parameter does not pass the IP address, but should use the domain name
Scnetworkreachabilitycreatewithname
This method is used in the famous reachability , which is used by our common network library afnetworking. So the students have to check it out, and the author of the project just a few days ago on this issue has a new submission, but the latest release version has not been added, you can click the following link first to see where he has changed.
Added support for IPV6 to reachability #3174
Check for incompatible IPV6 code
Search the project there are not the following API, these are only for IPv4 processing, and some words are deleted.
INET_ADDR ()
Inet_aton ()
Inet_lnaof ()
INET_MAKEADDR ()
Inet_netof ()
Inet_network ()
Inet_ntoa ()
Inet_ntoa_r ()
Bindresvport ()
Getipv4sourcefilter ()
Setipv4sourcefilter ()
If you use these IPv4 types on the left, then their corresponding IPV6 types also need to be handled
Ipv4-ipv6 Local build IPV6 test environment
Finally, let's set up a IPV6 test environment, all you need is a non-wi-Fi way to surf the Internet Mac computer.
What we have to do is to use a Mac to do a hot spot, and then use the iphone to connect to this Wi-Fi, it sounds easy, I believe everyone in the company is doing so.
The difference is that this time we are producing a local IPv6 dns64/nat64 Network, which is a new addition to OS X 10.11 . Unlike the way we used to open hotspots, we have to press and hold theOptionkey while "sharing" is selected in the "System Preferences" interface.
System Preferences
Then in the "sharing" interface, we will see and before the same place, is the red box labeled place, a more called "Create NAT64 Network" box, select it.
sharing
After that, just follow the normal process of creating hotspots.
Now we can use the iphone to connect to this newly created hot spot to be able to test, Note that this time to set the iphone into flight mode, to ensure that only Wi-Fi internet access.
Wen/I am not "Duan Yu (Jane book author)
Original link: http://www.jianshu.com/p/69ed4489762c
Copyright belongs to the author, please contact the author to obtain authorization, and Mark "book author".
iOS app compatible IPv6