title: Passing Data Between Two NSOperations
body: <p>I watched with a great attention the WWDC 2015 sessions about <a href="https://developer.apple.com/videos/play/wwdc2015-226/" rel="nofollow">Advanced NSOperations</a> and I played a little bit with the <a href="https://developer.apple.com/sample-code/wwdc/2015/downloads/Advanced-NSOperations.zip" rel="nofollow">example code</a>.</p>
  
  <p>The provided abstraction are really great, but there is something I may did not really good understand.</p>
  
  <p>I would like to pass result data between two consequent Operation subclasses without using a MOC.</p>
  
  <p>Imagine I have a <code>APIQueryOperation</code> which has a <code>NSData?</code> property and a second operation <code>ParseJSONOperation</code> consuming this property. How do I provide this <code>NSData?</code> intance to the second operation ?</p>
  
  <p>I tried something like this :</p>
  
  <pre><code>queryOperation = APIQueryOperation(request: registerAPICall)  
  parseOperation = ParseJSONOperation(data: queryOperation.responseData)  
  parseOperation.addDependency(queryOperation) 
  </code></pre>
  
  <p>But when I enter in the <code>execute</code> method of the <code>ParseJSONOperation</code> the instance in not the same as the same as in the initialiser.</p>
  
  <p>What did I do wrong ?</p>