IPv6 for iOS??
fraser.gordon at livecode.com
Mon May 9 08:55:46 EDT 2016
Now that the weekend is over, I’ve had a chance to look at IPv6 support for iOS.
The good news is that if you are using the URL syntax to access HTTP or HTTPS URLs, IPv6 support already exists. For example, see the screenshot here: http://downloads.livecode.com/fraser/ios_ipv6.png (the http://ipv6.google.com/ URL can only be accessed over IPv6). (Please forgive the lack of exciting UI design; it’s the stack we use for basic sanity checks of the iOS engine!). You can even use IPv6 literals in the URL (e.g. http://[2a00:1450:4009:809::200e]/ - the IP of ipv6.google.com).
The bad news is that (on all platforms) our raw sockets code only currently supports IPv4. This means that you won’t be able to open a socket to an IPv6 address nor will you be able to open a socket to a hostname via an IPv6-only network.
If you are using revDB to connect to a database, connecting via hostname should work over IPv6 networks. However, revDB does not support connecting to an IPv6 address directly (i.e connecting to “db.example.com” would work over an IPv6 network but you couldn’t connect to “[2001:41d0:8:cc68::]”) due to the way parsing of the host strings works (the first “:” is treated as the beginning of a port number). As URL syntax also works, connecting via an intermediate web service should be fine as well.
I don’t have a time-scale at the moment for adding IPv6 support for raw sockets but it is a fairly substantial job. Changing the low-level networking code to support IPv6 is relatively simple but there is a bigger challenge in terms of changing the LiveCode Script commands and functions for sockets to support IPv6 transparently and in a backwards-compatible manner. I’ll keep you posted on what’s going on.
As an aside, I found a lot of the reporting on news sites of Apple’s announcement to be misleading - there were implications of support for IPv4 being dropped. Reading Apple’s announcement (https://developer.apple.com/news/?id=05042016a), what they’re doing is requiring apps to support IPv6-only networks. Because a huge number of networks are still IPv4-only, this is essentially requiring apps to support both IPv4 and IPv6 rather than just IPv4.
More information about the Use-livecode