Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. let bundleIdentifier = Bundle.main.bundleIdentifier
  2. let configuration = URLSessionConfiguration.background(withIdentifier: bundleIdentifier!)
  3. configuration.timeoutIntervalForRequest = 200 // seconds
  4. configuration.timeoutIntervalForResource = 200
  5. self.alamoFireManager = Alamofire.SessionManager(configuration: configuration)
  6.  
  7. I am using above code setup alamofire for background configuration.
  8. alamoFireManager?.upload(data!, with: (router))
  9. .uploadProgress { progress in // main queue by default
  10. print("Upload Progress: (progress.fractionCompleted)")
  11. }.validate()
  12. .responseJSON { [weak self] response in
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement