Posts

Post marked as solved
6 Replies
3.0k Views
I am trying to connect to our webservice server vai MDM (Mobile Iron) tunnel. I am getting this error. 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: -10032019-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.}This is my code for TCP/IP connection. My iOS version is 11.3NSURLSessionDataTask *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];Any help would be appreciated.
Posted
by ahansraj.
Last updated
.