title: NSProgress not updating its totalUnitCount and completedUnitCount
body: <p>I am trying to report the download of a son file from a server to the requester through an instance of <code>NSProgress</code>. However, when I set the <code>totalUnitCount</code> and <code>completedUnitCount</code> values, these are simply not updating on the <code>NSProgress</code> object.</p>
  
  <p>This is how I initially create the progress object:</p>
  
  <pre><code>let progressUserInfo: [ String: String ] = [
      NSProgressFileOperationKindKey: NSProgressFileOperationKindDownloading,
  ]
  let progress = NSProgress(parent: nil, userInfo: progressUserInfo)
  progress.kind = NSProgressKindFile
  progress.totalUnitCount = -1
  progress.completedUnitCount = 0
  </code></pre>
  
  <p>I then keep an instance of this progress object around in the download manager and also pass it around to the caller that triggered the download.</p>
  
  <p>Now, when I receive a server response I update it with the following method:</p>
  
  <pre><code>func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveResponse response: NSURLResponse, completionHandler: (NSURLSessionResponseDisposition) -&gt; Void) {
      progress.totalUnitCount = response.expectedContentLength
      completionHandler(.Allow)
  }
  </code></pre>
  
  <p>Then, each time I get a chunk of data from the server, I update the progress:</p>
  
  <pre><code>func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveData data: NSData) {
      progress.totalUnitCount = dataTask.countOfBytesExpectedToReceive
      progress.completedUnitCount = dataTask.countOfBytesReceived
  }
  </code></pre>
  
  <p>To check if this works, I added a KVO for the <code>fractionCompleted</code> property. This observer fires each time I update the <code>completedUnitCount</code> property, however, when checkin the values on the progress object, nothing has changed there:</p>
  
  <pre><code>override func observeValueForKeyPath(keyPath: String, ofObject object: AnyObject, change: [NSObject : AnyObject], context: UnsafeMutablePointer&lt;Void&gt;) {
      let progress = object as NSProgress
      println("loaded user: \(progress.localizedDescription) - \(progress.localizedAdditionalDescription) = \(progress.fractionCompleted)")
  }
  </code></pre>
  
  <p>This always outputs <code>loaded user: Downloading files… -  = 0.0</code></p>
  
  <p>I currently have no clue what is going on here and if this is some kind of swift issue or a misuse of the <code>NSProgress</code> api.</p>
  
  <p>Thanks for your help in advance!</p>
  
  <p>//EDIT:
  Despite the fact that debugging is totally broken for me in Swift and I can not <code>po progress</code> in the debugger, when doing a <code>debugPrint()</code> on the various places, the output I get is the following:</p>
  
  <pre><code>&lt;NSProgress: 0x7f9473520f20&gt; : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of -1
  &lt;NSProgress: 0x7f9473520f20&gt; : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of -1
  &lt;NSProgress: 0x7f9473520f20&gt; : Parent: 0x0 / Fraction completed: 0.0000 / Completed: 0 of -1
  </code></pre>
  
  <p>So I am definitely using the same <code>NSProgress</code> instance everywhere!</p>