Hi Dave,
I'm wondering what are the best practices for passing data between NSOperations. In sample code, you create URL to file in cache directory, which URL you pass to two operations. First operation fetches earthquakes and saves data to this URL, second operation takes data from this URL and parse it. Although I find this concept interesting I believe that it is not always convenient to pass data like this.
Let's discuss one example. Let's say I have an operation A that wraps object insertion to CoreData. Then I have some operation B that is supposed to do some additional work on that inserted object. I initliaze both operations and make B dependent on A (B.addDependency(A)). After that I'm adding these to the queue. How should I pass that inserted object from A to B? The best way would be to pass this object during initialization (like you pass URL to a resource) but of course that object doesn't exist until A finishes its work. Setting this object in B in some completion handler doesn't seem right. But.. maybe it is?
What are the best practices for passing data between operations?