简体   繁体   中英

Swift IPv6 support

I'm trying to submit my iOS app in Apple. But they have rejected my app because of problems with IPv6: they tried to connect to our server from IPv6 network, and it wasn't successfull.
We changed our server side: now our server is ready to use IPv6 (I tested it on ipv6test.com, and everything was good).
In my app I'm using to create request. 创建请求。 And Apple got problem in such line of code:

var urlRequest: URLRequest = URLRequest(url: myServerUrl);
urlRequest.httpMethod = "POST";
..... //preparing POST data, setting timeout, etc.
urlRequest.httpShouldHandleCookies - true;
let task = URLSession.shared.dataTask(with: urlRequest, completionHandler: {(data: Data?, response: URLResponse?, error: Error?) in
do {
    guard let resp = response as? HTTPURLResponse else { throw NetworkError.connectionError;} //here they got a problem
....
}
catch {...}

I don't understand, why they cannot connect to our server. From our network (IPv4) everything is good.
And the main strange thing: I sent this app yesterday at 10:05. At 10:30 we've seen one request from the Apple's network, and it was successfull (200 status). It looks very strange, because they wrote, that they cannot even authorize in this app...
Please, can somebody help with this situation? I don't understand, where is a problem, and what should I do.

You should test issues like this by setting up a DNS64/NAT64 network using a Mac. link

Chances are that's what their QA are doing.

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