简体   繁体   中英

App rejected because of ipv6 network connectivity issues

The reason to reject my app is ipv6 network connectivity issues.

First, I am using AWS as my backend server. I use my domain name to connect with my server like http://ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com:80/parse where X is a number

Second, I tried to reproduce the issue by a) Go to my iPhone setting -> Developer -> Status (Newwork link conditioner) -> create a profile that exactly same as LTE but the Protocol is IPv6 b) Do the same thing as Apple suggest. Use the thunderbolt ethernet to connect my MacBook and share wifi with my iPhone. My app works in both cases.

Third, I take a look on AWS about supporting IPv6. Here is the link. http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html#AAAAFormat It seems nothing should be changed. I am not quite sure because I am not familiar with server.

Any suggestions? Thanks.


UPDATE

If you are using old apple's Rechability class and if you are using old AFNetworking's AFNetworkReachabilityManager class

Response - I did not implement any code for Reachability or AFNetworking. Should I worry about those classes are inside other sources' Frameworks like Parse?

在此输入图像描述

If you are using hard coded IP addresses

Response: My domain name is http://ec2-XX-XXX-XXX-XXX.compute-1.amazonaws.com:80/parse where X is a number. So, I think this should be fine.

there are few points that frequently cause this issue.

  • If you are using old apple's Rechability class then replace it with latest one because old Rechability class is not compatible with `ipv6 only network.
  • Same for old AfNetworking library, if you are using old AFNetworking's AFNetworkReachabilityManager class then replace this class with latest AFNetworkReachabilityManager class or replace whole library with latest one
  • If you are using hard coded IP addresses as api then replace it with domain name. For example you should not use api like : http://192.168.1.11:4444/login . Your api should be like : http://api.example.com/login

As Apple document states,

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

  • And your api hosting server should compatible with ipv6 (this is not major concern because almost server are compatible with ipv6)

You can refer Apple documentation for more details

You will come to know that how you can create ipv6 only network on your mac for testing also by above apple documentation!

My app is approved.

The only thing I change is

  • set the signing to "automatically managing signing" because my app fails to run when I change the build configuration to "Release" (I am not sure is this related to IPv6. I think it is kind of strange)

Reference for other people who use Google Map api, Parse hosting in AWS and Facebook login:

  • I think their frameworks are good to pass IPv6 requirement.

I am still questioning why Apple said my app fail to pass the IPv6 requirement in my last submission.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM