简体   繁体   中英

Iphone App Rejected Ipv6 Incompatibility

My application has been rejected twice for Incompatibility over Ipv6 network.

This question has been asked several times. Most of the solutions suggested to avoid using third party api for http request and do not hard code ipaddress. I have not done neither.

However does my server have to be ipv6 compatible or is there something wrong with my http request.

So I tested my server https://services.fingrowthbank.com/ on this website http://ipv6-test.com/validate.php for Ipv6 readiness testing. It shows as incompatible. Could this be a reason for the rejection?

Code for http request

let nsUrlObject: NSURL = NSURL(string: urlAndMethod)!
let nsMutableUrlRequestObj: NSMutableURLRequest = NSMutableURLRequest(URL: nsUrlObject, cachePolicy: NSURLRequestCachePolicy.ReloadIgnoringLocalCacheData, timeoutInterval: nstime_out_intervalObj)

nsMutableUrlRequestObj.HTTPMethod = “POST"
let bodyData = httpBodyStr
nsMutableUrlRequestObj.HTTPBody =  bodyData.dataUsingEncoding(NSUTF8StringEncoding)

nsMutableUrlRequestObj.setValue(httpHeaderStr, forHTTPHeaderField: "Authorization")

NSURLConnection.sendAsynchronousRequest(nsMutableUrlRequestObj, queue: NSOperationQueue.mainQueue())
{
  (response, data, error) in

   if response == nil
   {
      print(error)
      alert.view.removeFromSuperview()
      Imps_http_client.showAlertView("Could not connect to the server")
    }else{

    }

 }

There is no problem with your code. The problem is your server side.

As per https://services.fingrowthbank.com/ your server is not compatibility with IPV6. Because I found that you are using old security encryption ie, Obsolete Cipher suite .

I under lined inside the image.

I tested with sample server. Example: Apple. This apple is using modern cipher suite

苹果服务器

The problem with your server there is a chance of security attack number 13 . This is the reason the apple is rejected your app. Update your app with late security.

Solution: Just update your server to modern cipher suite .

在此处输入图片说明

This url is perfectly fine as far as your are using domain name for sending request to server. according to apple 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. If you aren't connecting by name, you probably should be.

check your code or any third party components you are using and make sure your are not sending any request with IP address instead of domain name. Specifically, Check Reacahbility code. If you are using it, don't use function reachabilityWithAddress , use reachabilityWithHostName instead. reachabilityForInternetConnection is also using reachabilityWithAddress - If you are using this, then edit it.

At last, you can validate your app for ipv6 by creating ipv6 network with mac and testing app with that network.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM