Ionic-framework: iOS-App rejected, no compatibility to IPv6?

Created on 5 Sep 2016  ·  67Comments  ·  Source: ionic-team/ionic-framework

Short description of the problem:

My iOS-Version of the Ionic-App was rejected due to the app apparently not supporting IPv6. I am using $http.get/post and have a Server-Api Configurable in a config-file to where the calls are made to.
Now my problem is that my Server supports IPv4 only, and has no IPv6 Connection to the internet, and it is impossible for me to get IPv6 on this server.

How can I sill possibly get my iOS-App into the store and have it working? I heard about some having success with a plugin called cordovaHTTP, but will it help me also?

Which Ionic Version? 1.x or 2.x
Version 1

Most helpful comment

Hi

I've just replaced uiwebview with wkwebview and then apple doesn't reject my app due to Ipv6...

Emmanuel LEPETIT
Envoyé de mon iPhone

Le 19 mars 2017 à 01:24, Michael Amaral notifications@github.com a écrit :

Sorry, @elepetit, can you explain how you solved the issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

All 67 comments

I'm not sure this is related to Ionic. We've successfully submitted an Ionic 1 app to the App Store and it was approved. Our backend handles IPv4 only.

This is just a wild guess, but it might be useful: Are you using a literal IPv4 address for your server (for example: http://192.0.2.3/) instead of letting DNS resolve it? This would break in NAT64/DNS64 environments and will probably be a reason for rejection.

I do it along the lines of:
localValues.loadResource('AppSettings.json').then(function (response) { apiUrlService.setApiUrl(response.apiEndpoint); }

apiUrlService is a Service providing methods like SetApiUrl, GetApiUrl and CallApi

Whereas AppSettings.json looks like this:
{ "apiEndpoint": "https://app.myServer.com/myAppApi" }

Same problem here, my app have been rejected due to the same reason, you can view here:
https://forum.ionicframework.com/t/apple-ipv6-http-ionic-reject/62546
http://stackoverflow.com/questions/39343443/apple-ipv6-http-ionic-reject

My connection is with my hostname, not with an IP address, I think that it's an Ionic problem because same URL connecting with a Cordova with AngularJS project is not failing. Any idea about it?

This has been brought up several times in the forums. Apple requires that all apps must work inside of an IPV6 environment. This is their rules, and we have to follow them.
Take a look at this doc page for a more in depth guide to test them. A long story short, is if you are hardcoding a server/endpoint in your code using an IP, it will not work in your app. It should be using the DNS name that you have registered for your endpoint.

If you have a mac, please take a look at the doc so you can see how to locally on your app. Using a plugin like cordovaHTTP will not actually help here, since @Z3roCoder server is not IPV6 compatible.

I think that it's an Ionic problem because same URL connecting with a Cordova with AngularJS project is not failing.

@zantos82 no, Ionic is not at fault here. Having looked into the issue quite a bit (blog post coming out soon), the issue is hard coding IP addresses. Ionic is JUST the UI layer in this case, and has zero impact on http/https. Again, pleas go through the doc page I linked to and test your app out.

@mhartington, thanks for your comments, but I', not agree with you when you assure that Ionic is not a problem in that case because $http call is going by ionic.bundle.js and not by angular libraries way. I have view some days ago the link that you told me and I have done a lot of test, on IPv6 native networks the app works, on IPv6 translated to IPv4 networks, works too, but in a link-local (or zero address called) networks doesn't work, and this is not a hardcoding IP address problem, because I'm calling the same hostname (f.e.: http://www.myserver.com/webservice_to_login or http://myserver.com/webservice_to_login). Then I ask you, what's the difference between three nets?

If you view the Ionic forum link I posted, network configuration that fails is the following:
IP address: 169.254.24.243
Subnet mask: 255.255.0.0
Router:
DNS: 2001:2:0:aab1::1

Resuming:
Ionic/AngularJS working: https://cdn-enterprise.discourse.org/ionicframework/uploads/default/original/3X/f/8/f80832330169dde2f42eecccc8b94327b477faac.PNG
Ionic/AngularJS working: https://cdn-enterprise.discourse.org/ionicframework/uploads/default/original/3X/7/1/71b02cb1249247b6520cbc011abd8470cec31fb3.png
Ionic NOT working/AngularJS working: https://cdn-enterprise.discourse.org/ionicframework/uploads/default/original/3X/4/f/4f4c0bac70315115204f034843b83a9194964089.png

Then, are you sure that Ionic is not the problem? There are a lot of Ionic developers like me...

$http call is going by ionic.bundle.js and not by angular libraries way.

ionic.bundle.js is a bundle of angular, ui-router, and ionic's components. The http that is in there is from Angular, not ionic.

Though I'm confused as to how you could be having issues. Would you be able to create a sample project to test against? Out of everything you've provided, nothing seems out of place, so I'm not sure why there are issues.

ionic.bundle.js is a bundle of angular, ui-router, and ionic's components. The http that is in there is from Angular, not ionic.

Yes, I supposed that, but... There isn't any modification between Angular's and Ionic's http?

I could make a basic test project but, do you know where can I call a "public" ws to do it?

Yes, I supposed that, but... There isn't any modification between Angular's and Ionic's http?

No. The http provided in ionic.bundle.js IS the exact same http in angular. Not because it's a copy/paste, but because IS Angular. Take a look through the v1 branch, there is nothing from ionic stepping on angular.

There are plenty of services out there.

https://randomuser.me/

https://gearside.com/public-json-feeds/

Well, I have generated the most simple example in the world to call WS with Ionic 1 and I have verified that server url called it's IPv6 capable. Then I have done my test and fails in 2nd (I don't know why now in the 2nd too) and 3rd configurations I described above and works only in 1st configuration. I haven't time to check it only with AngularJS. What files do you need and how you want to send you?

If you can, can you zip up the whole thing and send me an email

mike at ionic dot io

If you can, can you zip up the whole thing and send me an email

Email sent. I'll try to make a Cordova/AngularJS project during this morning to test it under same configurations but I can't try it until this afternoon, although then I have done I will send it too.

The most important configuration to test it is creating a IPv6/NAT64 network with a Mac shared connection, but Mac's main connection must be an IPv4 network, can't have IPv6 address, if not, app will work, because in fully IPv6 and IPv6 translated networks there are any problem, the problem is when is a link-local (or zero address) networks (who has only an IPv6 DNS address and local IPv4 IP)

I have just send other IPv6 test project but now with Cordova/AngularJS instead of Ionic, but I can't test if work in all the environments I described above because at my office we have a fully internal IPv6 network and I'm unable to simulate the worst conditions. At this afternoon I will test it again sharing my home IPv4 network with my Mac creating a link-local (or zero address) IPv6 translated net.

I have seen that second project have been rejected but there isn't any reason in reject email...

@mhartington Any news about the test project I sent you some days ago?

I never got it. Could you send it again

Mike Hartington

On Sep 12, 2016, at 4:53 AM, zantos82 [email protected] wrote:

@mhartington Any news about the test project I sent you some days ago?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

My project was also rejected twice. Quite a shock after the long development time :/

@doonot can you provide more information? Have you tested your app for IPv6 compatibility? Is your server reachable from IPv6?

Again, while this is not an Ionic specific problem, I'd like to know more so we can figure out how to help people in the best way possible. So the more info, the better.

@mhartington I have just sent it again, please check you inbox, you must have there.

@doonot What's the exact reason of your reject? Have you checked what Mike have told you?

Nothing still @zantos82

What email are you sending it to?

I have sent to mike at ionic dot io. Have you checked your spam folder? I haven't received returned...

captura de pantalla 2016-09-12 a las 17 11 25

Any alternative email to send it again? Could be the problem Mb of attached file size?

Yeah, it's not coming through on my end. If you can push to github, I will pull it down and take a look.

I have sent you by Wetransfer, if you not receive the download link I will upload to Github or Bitbucket.

Got it! Taking a look now

OK, thanks. I hope you can solve the issue because I'm totally unable to find a solution...

@mhartington Hey Mike. Yes I did test my app using this link:

Understanding and Preparing for the IPv6 Transition

They said that there is still an issue when the iPhone is connected to a IPv6 Wi-Fi Network. In short, the Facebook login activity indicator is shown, without any progress.

Now this information is not very helpful, as I tested it with the steps they provided. I now requested code-level-analysis from an Apple Engineer. Waiting since some days for them to contact me.

My web-hoster currently does not support IPv6 but I heard that this is not a requirement at all, is this correct?

My system information:

Cordova CLI: 6.3.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 1.3.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
ios-deploy version: 1.8.6
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.8.0
Xcode version: Xcode 7.3.1 Build version 7D1014

ionic plugins:

cordova-plugin-app-event 1.2.0 "Application Events"
cordova-plugin-badge 0.7.2 "Badges"
cordova-plugin-camera 2.2.0 "Camera"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-device 1.1.0 "Device"
cordova-plugin-dialogs 1.2.1 "Notification"
cordova-plugin-facebook4 1.7.1 "Facebook Connect"
cordova-plugin-file 4.2.0 "File"
cordova-plugin-file-transfer 1.5.1 "File Transfer"
cordova-plugin-geolocation 2.2.0 "Geolocation"
cordova-plugin-inappbrowser 1.3.0 "InAppBrowser"
cordova-plugin-network-information 1.1.0 "Network Information"
cordova-plugin-statusbar 2.0.0 "StatusBar"
cordova-plugin-vibration 2.1.1 "Vibration"
cordova-plugin-whitelist 1.2.0 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.0-dev "Cordova WKWebView Engine"
cordova-plugin-x-socialsharing 5.0.9 "SocialSharing"
ionic-plugin-deploy 0.5.7 "IonicDeploy"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 4.1.0 "BarcodeScanner"
phonegap-plugin-push 1.6.1 "PushPlugin"

My web-hoster currently does not support IPv6 but I heard that this is not a requirement at all

@doonot no your web host must be reachable in an ipv6 only environment. There for, it must support IPv6.

@mhartington Has you reproduced the error? Do you know any idea what's happening?

So far, I have not been able to reproduce the error. In my local tests, everything has been working fine. Still doing some more testing.

@mhartington oookay, that is new to me. Let me migrate to a web-hoster that fully supports IPv6. I will then resubmit my application and let you know here how it goes.

Thanks for the hint Mike!

@mhartington follow my steps and I'm sure that you will be able to reproduce it...

1.- Connect your Mac to an IPv4 only network by wire. This is the most important step because if your Internet provider have IPv6 support and your router have an IPv6 external address it will not work because in fully IPv6 networks there aren't any problem, it's only in translated IPv4 to IPv6 networks.
2.- Share your IPv4 wired connection by wireless with your Mac as Apple says creating an IPv6 net.
3.- If your device has cellular connection, turn "flight mode" on and then turn "WiFi" on.
4.- Connect your iOS device to your translated IPv4 to IPv6 network and wait until provided IP, subnet mask, router and DNS will be like following:
IP address: 169.254.X.X
Subnet mask: 255.255.0.0
Router:
DNS: 2001:2:0:aab1::1
5.- Open IPv6 test project.
6.- Open Safari and goes to "Development" -> "Your mac" -> "index.html"
7.- When Safari inspector goes open, click on "Console" tab.
8.- Click into "Test" button of IPv6 test project app.
9.- Check console message. If all went well (not really well, really is bad) you your see something like "Domain xxx.xxx is not reachable".
10.- Comment your results please.

And remember, the problem is not with fully IPv6 networks, the problem is with IPv4 only networks and shared with NAT64/DNS64 translating to a IPv6 network. Apple make the test by this way.

Network setup:
screen shot 2016-09-13 at 11 25 05 am

Network settings on Iphone
img_4192

Console from safari dev tools

screen shot 2016-09-13 at 11 32 37 am

Unless I'm missing something, it's not failing for me.

Well, it's normal that it work for you because your router it's providing an IPv6 address router to your iOS device. You must not have an IPv6 address (now you have two) and IPv6 router to get the fail. At my office I'm unable to reproduce it due the same reason, but at my home I can able to reproduce it. I think that you can try to disable IPv6 support from your router to try it again, what do you think? Apple problem it's the same, if the test with a IPv6 native (fully) network the app works well, the problem goes only with NAT64/DNS64 translated networks to a IPv4 network without IPv6 support...

@mhartington check the differences between both ways, I haven't any IPv6 address or IPv6 router...

4f4c0bac70315115204f034843b83a9194964089

Hmm, I'm at a loss here then. Talking to my ISP, I do not have any IPv6 capabilities for my service, and my router has IPv6 disabled

screen shot 2016-09-13 at 3 13 23 pm

So I'm not sure what to do right now. Only other thing I can suggest at this point is to create a simple middle layer that runs on ipv6 and have that talk to your web service. digital ocean has support for this. Not sure about heroku.

Try to deactivate all IPv6 interfaces, uncheck four interfaces at the end of this page and apply. Point 1 deactivate WAN IPv6 connection but Interfaces deactivate LAN/WLAN IPv6 network.

Still the same thing. Even with the interfaces deactivate, I'm not able to get an error.

Have you shut down and shut up your router and your mac? If your network haven't any IPv6 support your iOS device mustn't have IPv6 address and router params. I'm totally sure that this is the difference between work and fail because it's the same difference between my office and my home... Thanks for all your attention.

@Z3roCoder

From my experience, Facebook4 plugin was the cause of IPv6 rejection. Once I removed the plugin, it got thru the IPv6 test by apple.

I remember reading from somehwere that using Ionic Native wrapper around Facebook4 plugin also removes this problem but I cannot vouch as I have not tried this myself.

@cojj90 I have seen the same by Internet and could be the reason if you haven't any other server's request, but if you have more requests the problem could be what @mhartington said too...

Hey yall, going to keep an eye on this to help folks out where we can.

@mhartington Haven't you unable to reproduce the fail? Do you know if you will have some solution to pass IPv6 (link-local or zero address) Apple tests? I'm so worried about it. Why have you closed again?

As I've stated, while I want to be able to help as much as I can, this is not technically an Ionic issue.

I have not been able to replicate this locally, so I'm not sure what else to do.

I added in the blog post that a workaround if you're unable to host your own IPv6 network, that Digital Ocean has support for IPv6 and you can write your own middleware to work around it. Not ideal, but there's not a lot that Ionic can do about it.

@mhartington Well, we will suppose that it's not an Ionic problem (I'm not sure about it because a Cordova with AngularJS works well), then... Can't you help me with it? I'm unable to solve it alone... I know that there are a lot of cases more, but nobody has a solution for it...

@mhartington
Just some information of our case, it may not related to ionic, or even ipv4 address:
We have just passed approval of an app, using ionic v1 with fixed IPv4 address(not dns) yestoday.
And one week ago an app using ionicv2 with dns.

@zantos82 what plugins are you using?

@mhartington In my project I'm not using Facebook plugin but in the test project (who fails too) I'm using only the plugins which are added when the project is created, there are:

cordova-plugin-console 1.0.3 "Console"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

@mhartington Any news about it? Do you have any idea from when could be the problem?

@mhartington You assure that this is not an Ionic problem but I'm sure that it is. I have sent to Apple one Cordova (no Ionic) with AngularJS app for my job three days ago and I have received yesterday approved without any problem. The communication with webservices are with the same (AngularJS $http) that Ionic test project I did for you. Then... I keep my opinion that it's an Ionic problem...

It IS NOT an ionic problem, because Ionic is NOT doing anything to modify HTTP. Ionic IS ONLY the View layer of an app.

I don't know the specifics of your app, or what is happening, but I cannot stress enough, ionic WOULD NOT be the cause of any issues since it DOES NOT touch HTTP.

Well, well, you are an Ionic team member, you could be saying the truth, but I'm not agree with you because then both of mine test (Ionic and Cordova/AngularJS) projects must work and only fails Ionic project, the other one works well.

I have some question... There is any way to overwrite ionic angulares functions with angulares functions to make some test doing it? I think that could be a good test use angular.min.js HTTP function instead of ionic.bundle.js.

Not lying. Just look at the code. It's all open source, so feel free to poke around.

We're literally pulling angular in and just making one big file that contains

ionic.js - Utility functions that happen outside of angular
ionic.angular.js - Ionic's directives (ion-tabs, ion-item, etc)
angular.js
angular animate
ui-router

https://github.com/driftyco/ionic/blob/1.x/config/lib/js/angular/angular.js

I haven't said that you're lying, but consider that is some strange for me (and for Apple too) that in the test Ionic Project fails and Cordova/AngularJS project works (same function and same domain)...

Then... Can I substitute ionic.bundle.js file for these five files have told me to make some tests again? I believe in you but, believe you in me, there must be some strange in all of these problems and I have proposed looking for it until it will be solved because Apple is still rejecting apps due to same reason...

you can manually include all the files neeed, yes.

Pretty sure you'll only need these modules.

'ngAnimate', 'ngSanitize', 'ui.router'

as well in your app.

So you're index.html should have

angular, angular-animate, angular-sanitize, ui-router, ionic, ionic.angular.

Well, I will try it then... I must load modules in app.js, correct? And I must load the scripts in the index.html file in the order you said me, not? I have all files downloaded except ui-router that I must look for it to download...I want to load native files not Ionic project files (except ionic needed files).

@mhartington I'm unable to reproduce the conditions again, I think thats it's due to my device update to iOS 10.0.2 version, because now I have IPv6 router address too and always connect, the problem was when I didn't have IPv6 address. In what version of iOS do you realized the test?

@zantos82 you may want to try this plugins https://github.com/wymsee/cordova-HTTP.
I am having same rejected issue from Apple. Hope that plugins sort the issue.

@kythanh can you help me using cordovan-http, i'm trying but no success to get my data.

thx

Îve found that a pb with wkwebview can get apple to refuse due to ipv6 connection.
Îve solved it and everything goes well!!

Sorry, @elepetit, can you explain how you solved the issue?

Hi

I've just replaced uiwebview with wkwebview and then apple doesn't reject my app due to Ipv6...

Emmanuel LEPETIT
Envoyé de mon iPhone

Le 19 mars 2017 à 01:24, Michael Amaral notifications@github.com a écrit :

Sorry, @elepetit, can you explain how you solved the issue?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

so ... what seems to be the problem then? how to slve it? i have the same issue and can't seem to resolve it

In my case I just installed driftyco's wkwebview and Apple accepted it fine.

Sale for me

Emmanuel LEPETIT
Envoyé de mon iPhone

Le 28 mars 2017 à 13:08, Michael Amaral notifications@github.com a écrit :

In my case I just installed driftyco's wkwebview and Apple accepted it fine.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Hey guys!
My app was rejected twice recently duo to the ipv6.

Apple Review

From the apple's screenshot, app stop on ionic splash screen on ipv6 environment.
Same condition to @zantos82 , I test using apple's guiding on create ipv6 and app work normal. By the way, our web server is in China.
Otherwise, apple rejected my app due to it can't be loaded on ipv6 and post the screen shot.
I suspect that the reviewer is in the U.S and it's slowly to connect China's server using US network.
Hope to get your help.

If you' ll allow a slight digression, I like your lively discussion on the issue @zantos82 @mhartington

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings