It is already 17 years ago that IPv6 has been released, but since then the adoption has been very slow. With the release of iOS9 it may speed up now, since Apple will require apps to work with IPv6-only networks to be allowed in the App Store. Luckily Apple makes it easy for you when your server isn’t ready yet.
It is well known that the available IPv4 addresses are running out, since the number of people with internet access is increasing rapidly. At the moment the small address range of just 4 billion addresses still suffices. However, more and more devices with internet access appear every day. The address range of IPv6 is much larger, thus giving these devices an address is no longer a problem. More information about IPv6 can be found at Wikipedia.
It is possible for a device to have both an IPv4 address and an IPv6 address. This will help during transition, but it won’t help when you want to connect all these new devices to the internet. To ensure that all users with devices that only have an IPv6 address install can your app on their device, Apple will require that apps also work when a user is on such a network. It will be an App Store submission requirement later this year!
DNS64 and NAT64
IOS 9 makes it easy to have your app work well on devices that are only connected to an IPv6 network. In the best case your app can just connect with your server directly over IPv6. This won’t work however when your server only exposes an IPv4 address. So IOS 9 comes with support for DNS64 & NAT64. This makes it possible to connect to sites that only provide an IPv4 address, even when the device doesn’t have an IPv4 address itself. When an app on an IOS9 device tries to resolve a DNS address with only an IPv4 address the DNS server will synthesize a special IPv6 address. Data sent to this address will be forwarded by the NAT server to the real server. The traffic sent from the device to the NAT server run by the provider of the user uses IPv6, but the traffic between your server and the NAT server still uses IPv4.
According to Apple 70% of the apps should already work at this moment. No changes are required to get these apps working on IOS9 devices with only an IPv6 connection. A common problem that causes incompatibilities is to use IPv4 only API’s. Another common cause of incompatibility is checking connectivity by looking at whether the device has an IPv4 address or checking the reachability of “0.0.0.0”. More details about what doesn’t work with IPv6 or how to test correct workings is explained during the presentation.
We at Plot Projects have support for IPv6 since the first version of our plugin on both iOS and Android. You don’t have to take any steps to get our plugin to work on a device that only has an IPv6 address. We’re ready. Devices can connect directly with our servers without the need of a synthesized IPv4 address since our servers are reachable directly over IPv6. Current a small part of the traffic connecting with our servers already uses IPv6 from end-to-end, but we expect this to increase as a higher number of devices get connected over IPv6.
A more detailed explanation was given during the WWDC of 2015 during the talk Your App and Next Generation Networks. The talk is recorded, so if you want more information, check out the video.