I have a NSOperation subclass that runs in the background. It is non-concurrent. It downloads some data from a URL and then does some processing on the data.
Since it is already running in the background, I am using [NSData dataWithContentsOfURL] to download the data. Is there any advantage to making the operation concurrent and using a NSURLConnection?
The downloads are small so I don’t need to worry about pausing and continuing and I have error checking for the data in the processing.
Sure, first let me say that implementing NSURLConnection as an operation it’s little bit tricky, but it has a lot of advantages. First you can use callbacks, to manage authentications, upload bar, etc. Second you can manage multiple connection asynchronously on a secondary thread, with sync op you block the thread where the method is running in until it finishes.