skip to Main Content

Ios swift – Disable URLSession auto retry mechanism in iOS

When i make post API call using URLSession and a network disconnection happens while the API is in progress, i receive a network error callback from URLSession - Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=53, NSUnderlyingError=0x2822cc9f0 {Error Domain=kCFErrorDomainCFNetwork…

VIEW QUESTION

Upload file error handling using URLSessionConfiguration.background and uploadTask – Ios swift

I am using URLSessionConfiguration.background and uploadTask to upload a file from an iOS app. The upload session is configured in the following way: let configuration = URLSessionConfiguration.background(withIdentifier: "com.mycompany.myapp.fileUploader") configuration.isDiscretionary = false configuration.allowsCellularAccess = true uploadURLSession = URLSession(configuration: configuration, delegate: self,…

VIEW QUESTION
Back To Top
Search