Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPv6 - Apple rejects iOS app because of not Supporting IPv6 DNS64 / NAT64 Networks

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!

like image 567
Roman Avatar asked Aug 30 '16 08:08

Roman


People also ask

Does the App Store Support IPv6-only networks?

As of June 1, 2016, all apps submitted to the App Store must support IPv6-only networks. A majority of apps will not require any changes as IPv6 is already supported by NSURLSession and CFNetwork APIs.

How do I test for IPv6 dns64/nat64 compatibility on a Mac?

The easiest way to test your app for IPv6 DNS64/NAT64 compatibility—which is the type of network most cellular carriers are deploying—is to set up a local IPv6 DNS64/NAT64 network with your Mac. You can then connect to this network from your other devices for testing purposes.

Do I need to change my app's IPv6 settings?

A majority of apps will not require any changes as IPv6 is already supported by NSURLSession and CFNetwork APIs. However, if your app utilizes IPv4-specific APIs or hardcoded IP addresses, you'll need to make changes. Make sure to test for IPv6 compatibility before submitting your app to the App Store for review.

What happens when an IPv6 address is not found?

When an IPv6 address is found, it’s passed back to the client immediately. However, when an IPv6 address isn’t found, the DNS64 server requests an IPv4 address instead. The DNS64 server then synthesizes an IPv6 address by prefixing the IPv4 address, and passes that back to the client.


2 Answers

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.

like image 181
nix Avatar answered Oct 20 '22 11:10

nix


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.

like image 31
sharon Avatar answered Oct 20 '22 09:10

sharon