title: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."
body: <p>I have an application which works fine on Xcode6-Beta1 and Xcode6-Beta2 with both iOS7 and iOS8. But with Xcode6-Beta3, Beta4, Beta5 I'm facing network issues with iOS8 but everything works fine on iOS7. I get the error <code>"The network connection was lost."</code>. The error is as follows:</p>
  
  <blockquote>
    <p>Error: Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo=0x7ba8e5b0 {NSErrorFailingURLStringKey=, _kCFStreamErrorCodeKey=57, NSErrorFailingURLKey=, NSLocalizedDescription=The network connection was lost., _kCFStreamErrorDomainKey=1, NSUnderlyingError=0x7a6957e0 "The network connection was lost."}</p>
  </blockquote>
  
  <p>I use AFNetworking 2.x and the following code snippet to make the network call:</p>
  
  <pre><code>AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
  [manager setSecurityPolicy:policy];
  manager.requestSerializer = [AFHTTPRequestSerializer serializer];
  manager.responseSerializer = [AFHTTPResponseSerializer serializer];
  
  [manager POST:&lt;example-url&gt;
     parameters:&lt;parameteres&gt;
        success:^(AFHTTPRequestOperation *operation, id responseObject) {
            NSLog(@“Success: %@", responseObject);
        } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
            NSLog(@"Error: %@", error);
        }];
  </code></pre>
  
  <p>I tried <code>NSURLSession</code> but still receive the same error.</p>