3

Please read the question properly before downvoting.

There is no similar questions like this in SO.

I have in fact browser SO for a few hourse before deciding to ask.

There is a noticably weird bug I have found in Alamofire.

This problem only occur when the screen is locked when the app is on the foreground

Steps to Reproduce

  1. While App in the Foreground
  2. Lock Phone
  3. Unlock Phone
  4. Trigger a request with Alamofire. <- This first request will always fail Error Domain=NSURLErrorDomain Code=-1005 “The network connection was > lost.
  5. Every single request after this will get a proper response (success). Unless if the phone is locked again while it is in the foreground.

Can anyone using Alamofire find a fix to this?

N.B.: This problem found on Alamofire 4.0 and below. I have personally tested this on Alamofire 2.0 and it also has the same problem.

JayVDiyk
  • 4,277
  • 22
  • 70
  • 135

0 Answers0