我正在尝试通过MDM(Mobile Iron)隧道连接到我们的Web服务服务器。我收到此错误。
2019-05-31 09:44:47.346402-0500 xxxxx[3938:1731358] TIC TCP Conn Failed [3:0x2805215c0]: 12:8 Err(-65554)
2019-05-31 09:44:47.348358-0500 xxxxx[3938:1731358] Task <F00B000D-3B15-48CF-B053-6F6880F8A583>.<3> HTTP load failed (error code: -1003 [12:8])
2019-05-31 09:44:47.348682-0500 xxxxx[3938:1731358] Task <F00B000D-3B15-48CF-B053-6F6880F8A583>.<3> finished with error - code: -1003
2019-05-31 09:44:47.351787-0500 xxxxx[3938:1731366] Custom Error: Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={NSUnderlyingError=0x283e5b900 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, NSErrorFailingURLStringKey=https://internalWebServiceURL.com:8448/index.php/auth, NSErrorFailingURLKey=https://internalWebServiceURL.com:8448/index.php/auth, _kCFStreamErrorDomainKey=12, _kCFStreamErrorCodeKey=8, NSLocalizedDescription=A server with the specified hostname could not be found.}
这是我的TCP / IP连接代码。我手机上的iOS版本是11.3。
NSURLSessionDataTask *requestTask = [[NSURLSession sharedSession]
dataTaskWithRequest:theRequest completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (!error) {
NSHTTPURLResponse *httpResp = (NSHTTPURLResponse*) response;
if (httpResp.statusCode >= 200 && httpResp.statusCode < 300) {
NSError *jsonError;
id array = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:&jsonError];
if (!jsonError) {
dispatch_async(dispatch_get_main_queue(), ^{[self datareturn: array];});
}
}
else if(httpResp.statusCode == 500) {
self.title = @"No Data Found";
[self errorReturned:@"Server error occurred, please try again later."];
}
else {
self.title = @"No Data Found";
[self errorReturned:@"Unknown error occurred1, please try again later."];
}
}
else {
NSLog(@"Custom Error: %@", error);
[self errorReturned:@"Unknown error occurred2, please try again later."];
}
}];
[requestTask resume];
任何帮助将不胜感激。