Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple IPv6 $http Ionic reject

I have received my app rejected some days ago due to following reason:

We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 9.3.5 on Wi-Fi connected to an IPv6 network.

Specifically, we found an error message is produced when logging in. We've attached a screenshot for your reference.

Next Steps

Please run your app on a device while connected to an IPv6 network (all apps must support IPv6) to identify the issue(s), then revise and resubmit your app for review.

If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.

For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce the issue(s). For updates, install the new version as an update to the previous version, then follow the steps to reproduce the issue(s).

Resources

For information about supporting IPv6 Networks, please refer to Supporting IPv6 DNS64/NAT64 Networks and About Networking

If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions.

I have set two IPv6 networks, one of them in a time capsule and other sharing from my MacBook Pro. From the Time Capsule's network (who is a fully IPv6 network) the app works properly. From the MacBook Pro shared network I receive two results... When the device connect to this IPv6 network and get only DNS configured, the app works, but when it receive the DNS and one IP with the format 169.254.X.X the app crash the connection to the server.

The problem is that $http request answer goes by error side instead success side. I have tried with Ionic $http and cordova-http plugin (https://github.com/Switch168/cordova-HTTP#110) and the result was the same. I don't know what's happening, because I have a Cordova (only Cordova, not Ionic) project with AngularJS and it doesn't fail. Then, what's the difference between Ionic $http and AngularJS $http? I can't understand what's the difference.

Please see this image here.

$http request example (using Ionic $http and cordova-http plugin):

callWs: function(ws, method, data){
  var defferer = $q.defer();

  if (device.platform == 'Android' || device.platform == 'iOS'){

    $window.CordovaHttpPlugin.postJson(url_request,
      data_sent,
      {"cache-control": "no-cache, private, no-store, must-revalidate",
      "Authorization": basic_auth,
      "Content-Type": "application/x-www-form-urlencoded; charset=utf-8"
      },
    function(res) {
      defferer.resolve(res.data);
    }, function(error) {
      defferer.reject(error);
    });

  } else {

    $http({
        url: url_request,
        method: 'POST',
        withCredentials: true,
        timeout: HTTPTIMEOUT,
        headers: {
            'cache-control': 'no-cache, private, no-store, must-revalidate',
            'Authorization': basic_auth,
            'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8'
        },
        dataType : 'json',
        data: data_sent
    }).then(function (res) {
      defferer.resolve(res.data);
    }, function (error) {
      defferer.reject(error);
    });

  }

  return defferer.promise;

}
like image 287
zantos Avatar asked Aug 25 '26 22:08

zantos


1 Answers

Considering it's several months since you posted this, I am hoping you have already resolved this issue. I am answering this incase someone else lands here like I did when searching for solution.

This issue mostly arise due to issue in your server. It's important that your application need to work on ipv6 for Apple to approve your app. (see first comment) There is a handy tool which helped me find out if this is the case.

It is http://ipv6-test.com/validate.php

If that is the issue, the solution is as follows:

  1. Add an IPv6 address to your web server.
  2. Add an AAAA record for your website.
  3. Add an AAAA record for your bare domain.
  4. Ensure your DNS servers have IPv6 addresses.
  5. Add IPv6 glue for your nameservers, if necessary.
  6. Add IPv6 addresses for your incoming mail servers.
  7. Add reverse DNS for your mail servers’ IPv6 address.
  8. Check your SPF records.

If you are not familiar with any of the steps above, please check this link.

like image 181
esafwan Avatar answered Aug 27 '26 18:08

esafwan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!