14

Where is the error?

Apple reject app and sent messege:

Performance - 2.1

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, an error is displayed when a vote is made and Supporting IPv6 DNS64 / NAT64 Networks

"If you’re writing a client-side app using high-level networking APIs such as NSURLSession and the CFNetwork frameworks and you connect by name, you should not need to change anything for your app to work with IPv6 addresses."

Next on Apple Developer Forums says:

N 3 — Will I need to update my server? That depends on where your server is running: If you have a server running on the wider Internet, the answer is no. Your server will be accessible to IPv6-only devices via DNS64/NAT64. You should update your server to support IPv6 as a matter of course, but that’s something you can do in your own time. If you have a server embedded within your iOS app (for example, a web server that allows users to transfer files to and from your app), you should make sure it works well in an IPv6-only environment.

My hoster says:

We do not see any problems, for the server with IPv6 to your server is IPv4 will be available through DNAT / SNAT

My site (server): http://badroads.info

My code in App (this code was approved in another application a week ago):

func sendToServer(dataFromDictionary: Dictionary<NSString, AnyObject>) {
    let url: NSURL = NSURL(string: "http://badroads.info/t-or-c/****.php")!
    let request:NSMutableURLRequest = NSMutableURLRequest(URL:url)
    let session = NSURLSession.sharedSession()
    request.HTTPMethod = "POST"
    do {
        request.HTTPBody = try NSJSONSerialization.dataWithJSONObject(dataFromDictionary, options: [])
    } catch let parseError as NSError {
        request.HTTPBody = nil
        dispatch_async(dispatch_get_main_queue()) {
            EZLoadingActivity.hide()
            
            self.alertMessageSuccessError("Error", messageM: "Oops, something went wrong! Try again, please!")
        }
    }
    request.addValue("application/json", forHTTPHeaderField: "Content-Type")
    request.addValue("application/json", forHTTPHeaderField: "Accept")
    let task = session.dataTaskWithRequest(request, completionHandler: {data, response, error -> Void in
        if error != nil {
            dispatch_async(dispatch_get_main_queue()) {
                EZLoadingActivity.hide()
                self.alertMessageSuccessError("Error", messageM: "Oops, something went wrong! Try again, please!")
            }
            return
        }
        let json: NSDictionary?
        do {
            json = try NSJSONSerialization.JSONObjectWithData(data!, options: .MutableLeaves) as? NSDictionary
        } catch let parseError as NSError {
            dispatch_async(dispatch_get_main_queue()) {
                EZLoadingActivity.hide()
                self.alertMessageSuccessError("Error", messageM: "Oops, something went wrong! Try again, please!")
            }
            return
        }
        if let parseJSON = json {
            if let status = parseJSON["status"] as? String {
                if status == "200" {
                    dispatch_async(dispatch_get_main_queue()) {
                        EZLoadingActivity.hide()
                        self.defaultsDataLogin.setObject(true, forKey: "isDone")
                        self.alertMessageAdM("Successfully!", messageM: "See  results!")
                    }
                } else if status == "400" {
                    dispatch_async(dispatch_get_main_queue()) {
                        EZLoadingActivity.hide()
                        self.alertMessageSuccessErrorAdM("Error", messageM: "You have already data!")
                    }
                } else {
                    dispatch_async(dispatch_get_main_queue()) {
                        EZLoadingActivity.hide()
                        self.alertMessageSuccessError("Error", messageM: "Oops, something went wrong! Try again, please!")
                    }
                }
            } else {
                dispatch_async(dispatch_get_main_queue()) {
                    EZLoadingActivity.hide()
                    self.alertMessageSuccessError("Error", messageM: "Oops, something went wrong! Try again, please!")
                }
            }
            
        }  else {
            dispatch_async(dispatch_get_main_queue()) {
                EZLoadingActivity.hide()
                self.alertMessageSuccessError("Error", messageM: "Oops, something went wrong! Try again, please!")
            }
        }
    })
    task.resume()
}

But I checked my site on https://ip6.nl and http://ipv6-test.com/validate.php I got the following results: Results Results

Thanks!

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Roman
  • 1,045
  • 1
  • 12
  • 33
  • Is the hard-coded URL reachable over IPv6 ? – Alnitak Aug 30 '16 at 09:14
  • @Alnitak Apple say me For information about supporting [IPv6 Networks IPv6 DNS64/NAT64](https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1) Networks and About Networking In this tutorial says If you’re writing a client-side app using high-level networking APIs such as NSURLSession ... and you connect by name, you should not need to change anything for your app to work with IPv6 addresses.` – Roman Aug 30 '16 at 09:25
  • @Alnitak please will see update of my question. Thanks! – Roman Aug 31 '16 at 15:48
  • Right, so indeed as Apple said, the site _should_ be accessible via NAT64, and I can't see any reason why it wouldn't. Can't you ask them for more detail of the alleged failure? – Alnitak Sep 01 '16 at 07:41
  • Have you tried testing with environment setup mentioned in this link ? https://developer.apple.com/library/mac/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW1 – Amod Gokhale Sep 01 '16 at 17:02
  • 2
    If you have already tested and results look good. Please open up a Technical Support Incident (TSI) ticket with Apple and they will give you code level support. Here is link to open TSI https://developer.apple.com/support/technical/ – Amod Gokhale Sep 01 '16 at 17:02
  • i have tested code with AFNetworking 3.0 if that is something you can use – Amod Gokhale Sep 01 '16 at 17:03
  • @AmodGokhale, I use MacBook Air, I can`t connect to Ethernet like [this](http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/) – Roman Sep 01 '16 at 19:04
  • 1
    @Roman open up TSI ticket with apple – Amod Gokhale Sep 02 '16 at 06:46
  • @AmodGokhale I filed a request to the Apple. Waiting for an answer. Then I update the post. The situation is strange. after requesting in the Apple and changing Deployment target to 9 from 9.3.5 [application](https://itunes.apple.com/us/app/world-likes-trump-or-clinton/id1057176154) was ready to Sale. I did not change the code. – Roman Sep 02 '16 at 16:05
  • @AmodGokhale, thanks. But I'm afraid of problems in the future(( – Roman Sep 02 '16 at 16:29

2 Answers2

3

It is not about your server.

There must be few APIs in your application which are not supported to IPV6 (e.g. Reachability). Please update those with the latest and IPV6 supported ones.

I think NAT64 is not so much helpful.

nix
  • 427
  • 2
  • 8
  • What is concrete is wrong with this code, please tell me? More no other code for the server. I don`t use any API third-party. I use NSURLSession. I know that this code they will cause an error, I can see it from the screenshots from Apple – Roman Sep 01 '16 at 11:44
  • Not the third-party but any Apple API which consumes the internet(WiFi)? except NSURLSession? – nix Sep 01 '16 at 12:15
  • Using Crashlytics (3.7.3), Digits 2.4.0 Using Fabric (1.6.8) Installing Firebase 3.5.1 Installing FirebaseAnalytics 3.3.1 Using FirebaseInstanceID (1.0.8) Installing Google-Mobile-Ads-SDK 7.10.0 Using GoogleInterchangeUtilities (1.2.1) Using GoogleSymbolUtilities (1.1.1) Using GoogleUtilities (1.3.1) But Apple sent me screen on this code – Roman Sep 01 '16 at 12:22
3

It doesn't have to be an IPv6 network support issue. The app crashes and it is connected to an IPv6 network. It can be two different things. Ask the review team for crash logs, symbolicate those logs and find out whats the real problem.

sharon
  • 71
  • 5