required iPv6 compatibility - iOS app rejected by apple

Brainstorm Technolabs picture Brainstorm Technolabs · Jun 8, 2016 · Viewed 28.7k times · Source

enter image description here

after June 1, I submit my ionic app to itunes connect and I got the message from apple.

Apps are reviewed on an IPv6 network. Please ensure that your app supports IPv6 networks, as IPv6 compatibility is required.

For information about supporting IPv6 Networks, refer to Supporting iPv6 DNS64/NAT64 Networks.

For a networking overview, please see About Networking.

I have used AFNetworking for API call.

Please help to find out the solution for the same.

Thanks.

Answer

gunjot singh picture gunjot singh · Jun 8, 2016

If you are using IPv4-specific APIs or hard-coded IP addresses, you will need to update your code, Although all NSURLSession and CFNetwork APIs(including NSURLConnection) already support IPV6

As mentioned by Apple:

At WWDC 2015 we announced the transition to IPv6-only network services in iOS 9. Starting June 1, 2016 all apps submitted to the App Store must support IPv6-only networking. Most apps will not require any changes because IPv6 is already supported by NSURLSession and CFNetwork APIs.

If your app uses IPv4-specific APIs or hard-coded IP addresses, you will need to make some changes.

Although. Apple also recommends not to use IP Address Literals, for long term (Not necessary)

Don’t Use IP Address Literals

Make sure you aren’t passing IPv4 address literals in dot notation to APIs such as getaddrinfo and SCNetworkReachabilityCreateWithName. Instead, use high-level network frameworks and address-agnostic versions of APIs, such as getaddrinfo and getnameinfo, and pass them hostnames or fully qualified domain names (FQDNs). See getaddrinfo(3) Mac OS X Developer Tools Manual Page and getnameinfo(3) Mac OS X Developer Tools Manual Page.

Note: In iOS 9 and OS X 10.11 and later, NSURLSession and CFNetwork automatically synthesize IPv6 addresses from IPv4 literals locally on devices operating on DNS64/NAT64 networks. However, you should still work to rid your code of IP address literals

If you are using AFNetworking Library, Please make sure to update it to version above 3.x, as they seem to have updated few of the things. --> AFNetworking Added support for IPv6 to Reachability.

For Detailed Info, please follow this link

Supporting IPv6-only Networks

ALSO, TO TEST

You can follow this detailed tutorial:

tutorial-how-to-test-your-app-for-ipv6-compatibility