I have a lot of places in the code where Alamofire request/response are handled.
Each of this requests may fail because of some intermittent problem (the most commo
I've created one wrapper class for request retrier should function. https://gist.github.com/daljeetseera/7ce2b53b8a88d8a5e9b172c0495c6455
And used the request retrier in session manager required for request.
static let sharedManager: SessionManager = {
let configuration = URLSessionConfiguration.default
let manager = Alamofire.SessionManager(configuration: configuration)
let requestRet = NetworkRequestRetrier()
manager.retrier = requestRet
return manager
}()