Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let bundleIdentifier = Bundle.main.bundleIdentifier
- let configuration = URLSessionConfiguration.background(withIdentifier: bundleIdentifier!)
- configuration.timeoutIntervalForRequest = 200 // seconds
- configuration.timeoutIntervalForResource = 200
- self.alamoFireManager = Alamofire.SessionManager(configuration: configuration)
- I am using above code setup alamofire for background configuration.
- alamoFireManager?.upload(data!, with: (router))
- .uploadProgress { progress in // main queue by default
- print("Upload Progress: (progress.fractionCompleted)")
- }.validate()
- .responseJSON { [weak self] response in
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement