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
- While App in the Foreground
- Lock Phone
- Unlock Phone
- Trigger a request with Alamofire. <- This first request will always fail
Error Domain=NSURLErrorDomain Code=-1005 “The network connection was > lost.
- 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.