title: Alamofire Background Upload doesn't print Progress while app is in Background
body: <p>I am uploading <code>PDF</code> file to server using <code>Alamofire</code>. I have created <code>backgroundSessionManager</code> to make sure that app uploads file while app is in background. The code works perfectly as I am getting call over <code>backgroundCompletionHandler</code> from <code>AppDelegate</code> method <code>handleEventsForBackgroundURLSession</code>. </p>
  
  <p>The progress is I am showing progress and when app goes in background the progress is stuck and <code>.uploadProgress</code> completion is also not calling. Due to this when user goes in background and after some time when comes back then progress is not increasing.</p>
  
  <p><strong>Shared Instance:</strong></p>
  
  <pre><code>class Networking {
      static let sharedInstance = Networking()
      public var backgroundSessionManager: Alamofire.SessionManager // your web services you intend to keep running when the system backgrounds your app will use this
      private init() {
          self.backgroundSessionManager = Alamofire.SessionManager(configuration: URLSessionConfiguration.background(withIdentifier: "com.dw.myapp"))
  
          var backgroundCompletionHandler: (() -&gt; Void)? {
              get {
                  return backgroundSessionManager.backgroundCompletionHandler
              }
              set {
                  backgroundSessionManager.backgroundCompletionHandler = newValue
              }
          }
      }
  }
  </code></pre>
  
  <p><strong>Uploading file code</strong></p>
  
  <pre><code>Networking.sharedInstance.backgroundSessionManager.upload(multipartFormData: { (multipartData) in
   }, usingThreshold: UInt64.init(), to: "\(url)", method: .post, headers: headers) { (result) in
              switch result {
              case .success(let upload, _, _):
                  upload.uploadProgress(closure: { (progress) in
                  //Does not call while app is in background
                          Helper.dispatchMain {
                              print(progress)
                              print("Upload Time ", Date())
                          }
                      })
                      upload.responseJSON { response in
                          print("Response Time ", Date())
                          print("Response Time ", Date())
                      }
                  case .failure(let error):
                      completion!(["message" : error],false)
                  }
              }
  </code></pre>
  
  <p>I have search over SO and github page but din't find the solution. Any one can pls guide if I am making any mistake?</p>