Code=-1005, the network connection was lost, only with LTE

The code works with WiFi but fails when I switch to LTE.

NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x17005dc70 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=54, _kCFStreamErrorDomainKey=1}},


Other sites are reachable via LTE. It looks like the server doesn't get the request.

Can anyone help?


    NSString *dataUrlString = [NSString stringWithFormat:@"https://some_valid_server_name"];
    NSURL *url = [NSURL URLWithString:dataUrlString];
  
    NSURLSessionConfiguration *config = [NSURLSessionConfiguration defaultSessionConfiguration];
    NSURLSession *session = [NSURLSession sessionWithConfiguration:config];
    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url];
    request.HTTPMethod = @"POST";
    NSURLSessionUploadTask *uploadTask = [session uploadTaskWithRequest:request
                                                               fromData:someData
                                                      completionHandler:^(NSData *data,NSURLResponse *response,NSError *error) {
                                                           if (error != nil)
                                                              NSLog(@"ERROR %@", error);

                                                               }];
    [uploadTask resume];

Are you are brycesteve working together on this? I got in this morning and found no less than five threads all related to the same subject:

I will respond on the first one.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Code=-1005, the network connection was lost, only with LTE
 
 
Q