Category: WWDC

Video of Apple WWDC Session About IPv6 and iOS 9 Now Available (And Some Screenshots…)

Want more info about Apple’s new requirement for IPv6 support in iOS 9 applications?  At last week’s WWDC on Friday, June 12, 2015, the session “Your App and Next Generation Networks” covered the topic of IPv6 as well as latency and how to improve the speed of your apps.  The video is now available for viewing (note that on a Mac I was only able to view the video in the Safari browser):

WWDC video about IPv6The IPv6 section was presented by Prabhakar Lakhera, a “Core OS Networking Engineer” at Apple, and runs for about the first 14 minutes of the video.

To give you a view of some of the main points, here are some key screenshots.  First, Prabhakar talked about the need for IPv6 support and pointed out the growth in IPv6 traffic on North American mobile networks (and we’re seeing similar stats at the World IPv6 Launch measurements).

North American mobile networks and IPv6

He then talked about how Apple will use DNS64 and NAT64 to provide connectivity to the IPv4 Internet:

IPv6 using DNS64 and NAT64

He explained that to help in testing, Internet Sharing will now have a “Create NAT64 Network” option:

creating a NAT64 network

and provided a picture of how it all works:

IPv6 testing

He then indicated that 70% of the top 100 free apps had no problem with working over IPv6 and provided these pointers for “What Breaks?”:

What breaks?

It’s interesting to note what he said those points of breakage are:

  • Using IPv4-only storage objects (i.e. storing IPv4 addresses in some form)
  • Using IPv4-only APIs – or using an API in a way that is IPv4-only
  • “Pre-flight checks” (as the app is launching) before connecting and:
    • Checking if the device has an IPv4 address
    • Checking for reachability to 0.0.0.0

These “pre-flight checks” were an interesting item to me as I’d not thought about that mechanism before.  It makes sense for an app developer to check to see if the app can connect out to the Internet before starting to interact with the user.  I’ve had any number of iOS apps do that and warn me when I am not connected to the Internet.  However, only checking for IPv4 would render the app unable to work on an IPv6 network, even if the rest of the code works fine.

Prabhakar then went on to talk about what does work and offered several suggestions:

Apple IPv6 - what works?

Much of this was straightforward:

  • Don’t do a pre-flight check… just try to connect.
  • Use higher-level APIs so you aren’t working with IP addresses

He also encouraged people to read RFC 4038, “Application Aspects of IPv6 Transition”, which is definitely a good read for application developers.

He finished with an interesting addition to iOS 9 and also OS X 10.11.  It has always been possible to use an IP address directly in a URL.  For instance, “http://192.168.10.100/index.html” (which, of course, won’t go anywhere).  But how does an IPv4 “address literal” (as it is called) work in an IPv6-only network?

It turns out that Apple is going to “fix” this by synthesizing an IPv6 address so that the IPv4 literal will still work in an IPv6-only network:

Apple What Works for IPv6

He didn’t provide details of precisely what they are doing for that, but it’s interesting to know about.

There were certainly other parts I didn’t mention… if you are an iOS app developer I’d highly recommend you watch the video.  In fact, I’d also suggest staying on after the IPv6 part is done to watch what Stuart Cheshire has to say about latency and ways to make your app and services work better over congested networks.  Also extremely important!

It’s great to see Apple providing this support and encouraging the movement to IPv6.  We look forward to seeing many more applications work well in IPv6 situations.

If you want to get started learning more about IPv6, please head on over to our Start Here page to find resources to begin!