I believe that many iOS developers now know that Apple requires that the app we submit to the App Store must support IPV6.
1. Reference to IPV6 related. That this is directly associated with the Internet in our app, some of the content of the Department, whether to make corresponding changes. first of all, explain what is IPv6?
IPV6 is the next generation of Internet Protocol, it was originally proposed because with the rapid development of the Internet, IPV4 defined limited address space will be exhausted, the lack of address space will hinder the further development of the Internet. Popular say is that our network IP address is not enough, we each computer on the Internet need a proof of identity, that is, the IP address, IPv4 can use the address of 2 32-time address, and IPv6 can use the IP address of 2 128 square, Haha, Mother no longer have to worry about our IP address is not enough, of course, the benefits of IPv6 far more than just the increase of the address. There are also the following benefits:
A smaller routing table
IPV6 's address assignment begins with the principle of clustering (Aggregation), which allows the router to use a record (Entry) in the routing table to represent a single screen, greatly reducing the length of the router's middle table and increasing the speed of the router forwarding packets.
Enhanced Multicast (multicast) Support and convection support (Flow-control)
This makes the multimedia applications on the network have a great opportunity to develop, and provides a good network platform for Quality of service (QoS) control.
Added support for automatic configuration (auto-configuration)
This is the improvement and extension of DHCP protocol, which makes the management of network (especially LAN) more convenient and fast.
Higher security
In the IPV6 network, users can encrypt the data on the network layer and verify the IP packets, which greatly enhances the network security.
Through the above understanding, you must understand why Apple asked our app to support IPv6, and a strong attitude. Apple this is to develop in the future not affected by IPV, so the early Gordian knot.
That's a lot of crap: reference: http://www.jianshu.com/p/69ed4489762c
Enter the text:
We use the Advanced API to fully realize our needs, and the high-level API package is very easy to use, many of the underlying 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.
This method is used in the famous reachability class , and Our common network libraryThere's afnetworking inside.reachability. So with the students have to look well, we can go to see afnetworking/issues, and then can also ask, temporarily seemingly is not solved this problem click Open link Issues,
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
Specific corresponding fields: we must check.
The final step: that is to try to build a IPv6 environment, to test the entire project, the concrete steps to build the IPv6 environment are as follows:
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.
Summarize:
1. I believe that there will be more developers in the process of compatibility IPv6 will have a variety of problems, then go to the Forum, the technical Group to explore.
The Apple App for iOS is 6.1 compatible with IPV6, so what do we need to do as a developer? "Popular Science IPV6"