Howdy, folks! So by now, you’ve heard about how as of June 1, 2016, Apple is forcing apps to use IPv6 and figured out what that means for your app. Oh, wait…you haven’t? Ah, OK. Well, thankfully, this article covers some of the details. Take a read–I’ll just wait here for you.
Hey, you’re back! All right, let’s get into what this means for your app.
During development of your app, you’ve probably made an HTTP request or two. It’s a fairly standard practice. Sometimes you’re even able to build out your own API and control that, as well as your app. But chances are your API is built on IPv4, and as of this summer, Apple has made the move to require all APIs to use IPv6. So what does this mean, and why do you need to do this?
What Apple’s rules mean for your app
For the most part, developers really shouldn’t have to do anything! Apple’s rules state that in a IPv6-only environment, your app needs to be able to work. For your custom APIs, your hosting provider should support IPv6, as well as IPv4 at the same time.
The only caveat to this is if you hard-code a IP address, which won’t pass Apple’s IPv6 test. You’ll need to switch the IP to the hostname, instead.
But I’m not hard-coding an IP address! What should I do?
If you happen to be using a hostname but still run into issues, chances are you API is not available through an IPv6-only environment. In this situation, you should either reach out to your hosting provider or create a middleware that is hosted on a IPv6 reachable service, like Digital Ocean.
A brief history lesson on IPs
Back in the 1980’s, when the internet was still ARPANET, computers needed a way to figure out how to send data from one point to another. IPv4 was created to map out every possible end point. This is the standard IP address that we know and love today. IPv4 has its limits, though, as it only allows for roughly four billion unique addresses. This may sound like a lot, and in its era, it was. But it’s very clear that four billion isn’t a large enough number when you consider the internet of today and tomorrow.
IPv6 to the rescue
IPv6 resolves this issue by replacing IPv4 32-bit addresses with 128-bit. This means it can support 2^128 addresses. If you do the math, that’s well over several trillion addresses. That’s quite a bit more than four billion! Aside from the increase in available addresses, endpoints can also auto-configure their own addresses. This makes IPv6 much more flexible, compared to IPv4.
While it may seem sudden and brash for Apple to do this, IPv4 full replacement is inevitable. Instead of dealing with this “down the road,” Apple has decided to be proactive, which is good. Hopefully this clears up any confusion or questions.