locked
App Store Rejected - Wi-Fi connected to an IPv6 network RRS feed

  • Question

  • User141865 posted

    Hi guys,

    I have a problem, Im trying to publish my app on app store(apple), but it is being rejected.

    We discovered one or more bugs in your app when reviewed on iPhone running iOS 9.3.4 on Wi-Fi connected to an IPv6 network. 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. _

    I know that aple started enforcing a new policy whereby all iOS applications must support IPv6-only network services in iOS 9. While Apple states that most apps will not need to be changed or updated, your app may be using a few libraries that need to be updated before you submit your next update.

    But im using httpclient to a server with no hard coded IP.. and i have this problem now..

    Do you guys know how to help me? Is it a Xamarin Bug?

    Im using HttpClient

    string uri = "https://example.azurewebistes.net/api/example"
    
    HttpClient client = new HttpClient();
     var response = await client.GetAsync(uri);
    

    Relevant link https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1 https://blog.xamarin.com/making-your-ios-apps-ipv6-ready/

    The print anexed is from app review

    Xamarin.Forms version: 2.3.0.46

    Friday, August 26, 2016 8:40 PM

Answers

  • User141865 posted

    Yea.. I changed nothing and they aproved. They rejected 3x my app

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, September 2, 2016 3:42 PM

All replies

  • User121043 posted

    I'm getting the same rejection notice too. I'm using WebRequest.CreateHttp

    Saturday, August 27, 2016 4:12 AM
  • User141865 posted

    Yea.. Really annoying!

    Any help please? I need to publish this app :/

    Saturday, August 27, 2016 2:53 PM
  • User179460 posted

    We are having the same issue, our App was rejected twice, and they said:

    "We discovered one or more bugs in your app when reviewed on iPad and iPhone running iOS 9.3.4 on Wi-Fi connected to an IPv6 network. Specifically, your app still states that there is no internet connection on launch".

    We followed the test specified on Apple article about testing on IPv6 with DNS64/NAT64 compatibility, even using a IPv6 proxy, and our app works well. We can't reproduce the issue.

    Our Api is hosted in Azure, and we are using the Azure Mobile SDK to consume it. Additionally, we are using Xamarin.Forms to build the UI.

    The worst thing is that we can't reproduce it, so we do not have idea how to solve it.

    Saturday, August 27, 2016 3:07 PM
  • User49366 posted

    We submitted about 20 apps with the same source code, 3 were rejected for this reason and the rest passed. We use modernhttpclient and generally don't do anything but regular HTTPS GET/POST.

    HOWEVER, just after I first posted this I realized we are using sample code from Xamarin that does use IPv4:

    https://github.com/xamarin/monotouch-samples/blob/master/ReachabilitySample/reachability.cs

    I've added an Issue: https://github.com/xamarin/monotouch-samples/issues/106

    Sunday, August 28, 2016 1:43 AM
  • User184133 posted

    I'm facing the same problem...

    My app just have an httpclient. no hardcoded ipaddres...

    :-(

    Monday, August 29, 2016 8:10 AM
  • User84530 posted

    My App was also rejected, i just updated Microsoft.Rest.ClientRuntime from 0.9.6 to 2.3.2 and it was accepted.

    Monday, August 29, 2016 9:25 AM
  • User141865 posted

    I dont have this lib installed on my xamarin project.. Microsoft.Rest.ClientRuntime

    Where do you use it ?

    Are you using HttpClient?

    Monday, August 29, 2016 12:36 PM
  • User210652 posted

    @RasmusBjerg Do you use Azure to host your Web-Application?

    Monday, August 29, 2016 3:22 PM
  • User141865 posted

    @ChristianHoefle said: @RasmusBjerg Do you use Azure to host your Web-Application?

    Yes man, i use Azure to host my server.

    Monday, August 29, 2016 3:25 PM
  • User84530 posted

    Yes i do, i use an App Service enviroment

    Monday, August 29, 2016 4:40 PM
  • User21788 posted

    Here is the problem.

    private bool IsNetworkAvailable(out NetworkReachabilityFlags flags)
            {
                if (defaultRouteReachability == null)
                {
                    **defaultRouteReachability = new NetworkReachability(new IPAddress(0));**
                    defaultRouteReachability.SetNotification(OnChange);
                    defaultRouteReachability.Schedule(CFRunLoop.Current, CFRunLoop.ModeDefault);
                }
                if (!defaultRouteReachability.TryGetFlags(out flags))
                    return false;
                return IsReachableWithoutRequiringConnection(flags);
            }
    
            private bool IsAdHocWiFiNetworkAvailable(out NetworkReachabilityFlags flags)
            {
                if (adHocWiFiNetworkReachability == null)
                { 
                    **adHocWiFiNetworkReachability = new NetworkReachability(new IPAddress(new byte[] { 169, 254, 0, 0 }));**
                    adHocWiFiNetworkReachability.SetNotification(OnChange);
                    adHocWiFiNetworkReachability.Schedule(CFRunLoop.Current, CFRunLoop.ModeDefault);
                }
    
                if (!adHocWiFiNetworkReachability.TryGetFlags(out flags))
                    return false;
    
                return IsReachableWithoutRequiringConnection(flags);
            }
    

    I'll change it to a Url to see how it evolves. Both NetworkReachability receive an IP v6 address. This code was taken from an availability recipe.

    Tuesday, August 30, 2016 10:07 PM
  • User245701 posted

    I got rejection with same reason yesterday. I am using System.Net.HttpWebRequest and Microsoft.Azure.Engagement.Xamarin. I tested again but I have not experienced the issue(s) that Apple discovered in the IPv6 network environment that I built with Apple official procedure. https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1

    I told them above and asked them re-examination, then it was accepted today, It depends on luck...?

    Thursday, September 1, 2016 5:11 AM
  • User141865 posted

    Same here..

    I changed nothing and apple approved my app now..

    I guess they are doing wrong on testes.. idk

    Thursday, September 1, 2016 5:18 AM
  • User210652 posted

    @MarcoMacedo So you pushed the same app again using Azure Mobile Services and HttpClient and it was approved? What the f* is going on with Apple?

    Friday, September 2, 2016 7:43 AM
  • User141865 posted

    Yea.. I changed nothing and they aproved. They rejected 3x my app

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Friday, September 2, 2016 3:42 PM
  • User179460 posted

    Hello everyone, finally our app was approved. We are not sure what fixed the issue running our app over an IPv6 network because we could not reproduce it, but we updated our Azure Mobile Client SDK to the latest version, and we started using the ModernHttpClient (https://www.nuget.org/packages/modernhttpclient/) to use it as HttpClient handler.

    Tuesday, September 6, 2016 11:09 PM
  • User49366 posted

    Updating to the latest Connectivity plugin seems to have resolved the issue for us.

    Saturday, September 10, 2016 1:09 AM
  • User255975 posted

    Our app was rejected for the same reason, and we don't use the Connectivity plugin. We were able to repro this by starting the application when connected to an IPV4 network then switching to an IPV6 network without closing the app. After that, network requests made using HttpClient would fail. Interestingly, if the app starts connected to an IPV6 network, all seems fine; it's only switching from IPV4 to IPV6 that seems to have issues. We were also able to repro this on some (not all) other Xamarin apps in the app store so this seems to be a general issue.

    We switched the HttpClient stack to NSUrlSession (https://developer.xamarin.com/guides/cross-platform/macios/http-stack/) which resolved it on our end. We recently resubmitted to the app store so we will see if it is accepted to the app store now.

    Saturday, September 10, 2016 4:27 PM
  • User141865 posted

    @DavidS.4178 said: Our app was rejected for the same reason, and we don't use the Connectivity plugin. We were able to repro this by starting the application when connected to an IPV4 network then switching to an IPV6 network without closing the app. After that, network requests made using HttpClient would fail. Interestingly, if the app starts connected to an IPV6 network, all seems fine; it's only switching from IPV4 to IPV6 that seems to have issues. We were also able to repro this on some (not all) other Xamarin apps in the app store so this seems to be a general issue.

    We switched the HttpClient stack to NSUrlSession (https://developer.xamarin.com/guides/cross-platform/macios/http-stack/) which resolved it on our end. We recently resubmitted to the app store so we will see if it is accepted to the app store now.

    Tell us if they aproved or not =)

    Saturday, September 10, 2016 5:57 PM
  • User255975 posted

    @MarcoMacedo said:

    @DavidS.4178 said: Our app was rejected for the same reason, and we don't use the Connectivity plugin. We were able to repro this by starting the application when connected to an IPV4 network then switching to an IPV6 network without closing the app. After that, network requests made using HttpClient would fail. Interestingly, if the app starts connected to an IPV6 network, all seems fine; it's only switching from IPV4 to IPV6 that seems to have issues. We were also able to repro this on some (not all) other Xamarin apps in the app store so this seems to be a general issue.

    We switched the HttpClient stack to NSUrlSession (https://developer.xamarin.com/guides/cross-platform/macios/http-stack/) which resolved it on our end. We recently resubmitted to the app store so we will see if it is accepted to the app store now.

    Tell us if they aproved or not =)

    Approved today. :)

    Monday, September 12, 2016 2:53 PM
  • User247410 posted

    My app was rejected for same reason. Can someone provide best solution to fix this issue asap?

    Tuesday, September 20, 2016 2:04 AM
  • User141865 posted

    @JakobDinesen

    I just sent again, and they approved.. lol But you can see what @DavidS.4178 suggested.

    Tuesday, September 20, 2016 2:10 AM
  • User215296 posted

    @Marco Macedo : I have issue same as you, I config as your tutorial, and I test app with network ipv6 but i have another error "A Server with the specified hostname could not be found.", I try access hostname url by safari and get error. Attachment file is setting of project Can you help me ? Thanks.

    Tuesday, September 20, 2016 2:55 AM
  • User46031 posted

    I also have this issue. Changing to NSUrlSession has not resolved. As outlined by others, when the initial connection is established as IPv4 and then switched to IPv6 causes the issue. i get the following error:

    Error getting response stream (ReadDone1): ReceiveFailure

    I am relying quite heavily on RestSharp... client not happy, not sure what to do.

    Any advice appreciated.

    Wednesday, September 21, 2016 8:06 AM
  • User66766 posted

    @VinnieVivace this might work for you. https://github.com/FubarDevelopment/restsharp.portable/issues/34

    RestSharp doesn't use HttpClient under the covers

    Wednesday, September 21, 2016 4:07 PM
  • User46031 posted

    @DH_HA1 . Thank you very much. With a few hours of stuffing around, this did indeed resolve my issues, cheers.

    Friday, September 23, 2016 1:13 AM
  • User259956 posted

    Hi Guys,

    Looked at all the above and quite interesting - however I am still stuck and app has been rejected 3 times already. Initially used IP literals and since them modified to fully qualified domain name and still no luck.

    I am using Visual Studio 2015 / Xamarin to build the app.

    1) Reference the WCF service using SVCUtil 2) Calling the Service using System.ServiceModel 3) Using BasicHttpBinding as below.

    The below works fine on IPV4 networks and the server which is hosting the WCF is only IPV4 enabled.

    The more I think about it - i believe this is nothing more to change on the code but it is more towards the configuration of the domain name which is hosted by godaddy.

    At this stage, it is using the default nameservers of godaddy which i think does not allow for DNS64/NAT64 services.

    I have researched and found out that Google provides DNS64 services and tried to include them on the nameserver settings in godaddy - but godaddy for some reason keeps coming up with invalid address.

    I am also fully Windows Based and did not managed to do the DNS64/NAT64 test as advised by Apple unless I go an purchase a physical Mac - note, currently using an online Mac Instance from Macincloud to build my files.

    I have also tried to include the equivalent IPV6 address on the AAAA records on godaddy - but i think this is not the way to go since DNS64 should be the one doing that job and that domain should only have A records.

    I would appreciate if anyone could please help me to check whether this is actually a networking / domain problem or code level ?

    Thanks again all in advance.

    private static readonly EndpointAddress RacingEndPoint = new EndpointAddress("http://www.totelepep.com/mobi.svc");
    
        private static MobiClient GetServiceClient()
        {
            BasicHttpBinding binding = new BasicHttpBinding
            {
                Name = "basicHttpBinding",
                MaxBufferSize = 2147483647,
                MaxReceivedMessageSize = 2147483647
            };
    
            binding.ReaderQuotas = new System.Xml.XmlDictionaryReaderQuotas()
            {
                MaxArrayLength = 2147483646,
                MaxStringContentLength = 5242880,
            };
    
            TimeSpan timeout = new TimeSpan(0, 0, 30);
            binding.SendTimeout = timeout;
            binding.OpenTimeout = timeout;
            binding.ReceiveTimeout = timeout;
    
            MobiClient client = new MobiClient(binding, RacingEndPoint);
            return client;
        }
    
    Saturday, September 24, 2016 2:34 AM
  • User215296 posted

    @Marco Macedo : do you config webservices azure api ? I make same as your guide but it's not successfully.

    Saturday, September 24, 2016 2:50 AM
  • User158182 posted

    Hi everyone,

    I just had same issue today and after testing my app on a local IPv6 network, I easily reproduced the error and the app crashed. I resolved the issue but forgot to check what actually causes it :(

    Here are the steps I followed: - Updating Plugin.Connectivity to latest stable version. - Changing HttpClient implementation from Default to NSUrlSession. (In iOS Properties > iOS Build > Advanced) - Installing ModernHttpClient library from NuGet. - Updating my API URL from using HTTP to HTTPS. (Just could not use HTTP after the steps above, app threw exception)

    PS: My web app is deployed on Azure and I did not configure anything specifically for this.

    Hope that it will work for you, too! I will also update this message, when my app passes the App Store review :smile:

    Sunday, September 25, 2016 12:09 AM
  • User158182 posted

    Yeah my app passed the App Store review after these fixes. Hope someone will benefit :smile:

    Thursday, September 29, 2016 1:25 PM
  • User43076 posted

    same problem. solution:

    if you use something like this in your project

    var address = "xx.xx.xx.xx";
    var client = new System.Net.Sockets.TcpClient(address);
    var result = client.BeginConnect(ipAddressClass, portNumber, null, null);
    

    change it to:

    var ipAddressClass = System.Net.IPAddress.Parse(ipAddress);
    var client = new System.Net.Sockets.TcpClient(ipAddressClass.AddressFamily);
    var result = client.BeginConnect(ipAddressClass, portNumber, null, null);
    
    Monday, October 17, 2016 8:44 AM
  • User66138 posted

    How are you able to test on a local IPv6 network?

    Thursday, February 2, 2017 11:43 PM
  • User46031 posted

    @RickG if you have OSX available:

    https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1

    (scroll down about half way for instructions)

    Thursday, February 2, 2017 11:46 PM
  • User66138 posted

    Thanks!!! @VinnieVivace, my issue apple complained about is that my FB login page waits too long?!? but nevertheless, they gave me the error above.

    I did get the IPV6 network going and logging in with FB works for both "Managed" and "NSUrlSession" but I've always submitted the app with "Managed" soooooo

    I'm going to submit it a 3rd time with the recommended "NSUrlSession" setting noted above so stay tuned folks...Lets hope 3rd time is the charm.

    Friday, February 3, 2017 2:34 AM
  • User66138 posted

    Apple rejected me again saying that FB just spins when clicking the "Continue as Fly" button over IPV6 on an iPad.

    Modifications I've made for the version they are testing are below so as per the research, these fixes should've fixed it:

    1. I updated to the latest Xam.Connectivity plugin which is supposed to fix the IPV6 issues
    2. I changed the HTTP in the IOS Options to use "NSURLSession" instead of the default
    3. Tested it and it passed - I created a local IPV6 network as per the link above using my ethernet & wi-fi to get it to work.
    4. I validated that NO IP Addresses are used in my app

    My testing as per the instructions above work properly but apple says they can't get past this page when they click the button.

    Perhaps the FB oauth url is not IPV6 ready? https://m.facebook.com/dialog/oauth/ I'm going to try w/o the "m".

    Let me know if anyone has gotten this far with all the fixes recommended and still got rejected and what did you do to fix this? Thanks

    Friday, February 3, 2017 3:45 PM
  • User66138 posted

    I'm using xamarin auth for my FB login and they recomend using this code snippet below but when I do an IPV6 test on that "m." url using (http://ready.chair6.net/), it gives me a warning so maybe I need a different authorizeUrl for FB that is IPV6 compatible?

    using Xamarin.Auth; var auth = new OAuth2Authenticator ( clientId: "App ID from https://developers.facebook.com/apps", scope: "", authorizeUrl: new Uri ("https://m.facebook.com/dialog/oauth/"), redirectUrl: new Uri ("http://www.facebook.com/connect/login_success.html"));

    Friday, February 3, 2017 4:01 PM
  • User66138 posted

    I re-submitted & removed the "m" from Facebook url and I also tested the IPv6 as per their documentation and it all works fine. I took a video of the whole thing and if they reject my app again, I'll show them the video but at this point, I've changed what needs changing based on all your recommendations. Thanks!

    Sunday, February 5, 2017 12:19 AM
  • User66138 posted

    it finally passed, crazy...maybe the "m" in the facebook url fixed it, i really don't know but that was the last thing i changed before submitting for the last time.

    just a quick list of what i did 1. changed to use NSURLSession 2. updated the xamarin plugin for connectivity to the latest version 3. in the xamarin auth section for connecting to FB, i changed to use "www" instead of "m"

    Sunday, February 5, 2017 1:28 AM
  • User337668 posted

    hello friends , i am having same problem , because webservices i use does not support ipv6, but i want to upload to app store, is it possiple, plz help me

    Thursday, July 20, 2017 10:56 AM
  • User144946 posted

    news?

    Monday, July 24, 2017 6:23 PM
  • User184133 posted

    Hi all, i have the same problem. I test my app via a mac sending an ipv6 ip address. I don't have any crash. But during the apple validation they says it crashes. Probably i'm missing something? How do you ensure your network is a real ipv6? Regards

    Tuesday, October 10, 2017 11:47 AM